WordPress.org

Ready to get started?Download WordPress

Forums

Transparent background color with opaque text? (6 posts)

  1. nmallory
    Member
    Posted 8 years ago #

    Does anyone know how to do a transparent background color with non-transparent text over it?

    I'm currently attempting this here.

    I tried googling a solution but none of the solutions I've come across seem to work.

    Here is the related css code:

    /* first column */
    #content
    {
    float: left;
    width: 300px;
    opacity: .5;
    filter: alpha(opacity=50);
    }
    #content *
    {
    position: relative;
    }

    .post
    {
    margin: 3%;
    padding: 3%;
    background-color: #EDB795;
    color: #8A3A38;
    }

    Thanks in advance!

  2. Joshua Sigar
    Member
    Posted 8 years ago #

  3. nmallory
    Member
    Posted 8 years ago #

    That's the method I was attempting on that page. Sadly, it does make the post transparent, but it makes everything transparent, not just the background color, which is what I want. I would like everything else to be normal.

  4. nmallory
    Member
    Posted 8 years ago #

    Interesting. It works correctly in IE but not Mozilla.

    And I've also discovered that IE doesn't recognize the margins I set. *sigh*

    Edit: no, I was wrong. The text is right in IE but the background color is not AND it doesn't recognize the margins. I'm very confused and frustrated.

  5. kickass
    Member
    Posted 8 years ago #

    http://www.domedia.org/oveklykken/css-transparency.php
    http://www.jadwigo.nl/tools/transparency/index.html.php

    Problem with transparency that WORKS is that it's css3 and doesn't validate . . .

  6. kickass
    Member
    Posted 8 years ago #

    Oh, forgot to add, to do the nontransparent text over the transparent backgrounds you need to layer your divs and use wrappers. For instance, the body gets an image background, the wrapper gets a transparent background, and the div inside the wrapper gets the opaque text.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.