3

I've looked at tons of posts pertaining to my problem and nobody really has the same html so I can't really figure it out.

I'm trying to make my tumblr blog's post background semi-transparent without making the photos, videos, text, etc. on the post transparent. Right now I have

   #left-column .post {
    opacity: 0.5;
    filter: alpha(opacity=50);
    z-index: -1;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    float: left;
    padding-top: 20px;
    width: 520px;
    }

I'm sure I need to supply more code for this question. If you have any requests I'll copy/paste over to here. Also, I only know the basics to html/css so if I don't understand something right away, I'll have a question or two. Thanks.

user2632633
  • 61
  • 1
  • 1
  • 5
  • Check this link may be you it will help you , http://stackoverflow.com/questions/806000/css-semi-transparent-background-but-not-text?rq=1 – user2582303 Jul 30 '13 at 05:42

2 Answers2

2

Use RGBa (Red Green Blue Alpha)

background-color: rgba(255,255,255,0.5);

So your code would be

#left-column .post {
    z-index: -1;
    background-color: rgba(255,255,255,0.5);
    border: 1px solid #ccc;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    float: left;
    padding-top: 20px;
    width: 520px;
}
doitlikejustin
  • 6,293
  • 2
  • 40
  • 68
0

you can use this website http://hex2rgba.devoth.com/ to make your background how you need it how transparent to be and what color

try this code:

#left-column .post {
 background: rgba(255, 255, 255, 0.5);
 border: 1px solid #ccc;
 border-radius: 5px;
 -moz-border-radius: 5px;
 -webkit-border-radius: 5px;
 float: left;
 padding-top: 20px;
 width: 520px;
}

rgba(255, 255, 255, 0.5) = #FFF

Mihai Viteazu
  • 1,631
  • 3
  • 13
  • 15