therschbach Posted February 14, 2009 Share Posted February 14, 2009 I've tried everything I can think of, but I'm new to this so I'm sure you guys can see what I'm doing wrong. I have a div containing a paragraph and I've set the div background to gray. I want the gray background to be semi-transparent. I plug my code into the example editor and it works so there must be something else going on. Here's my css so far. The box in question is div#intro . body{background-image:url('pictures/coinbackground.jpg');margin: 0;text-align: center;}div#entire {margin: 1em auto;width: 900px;border: ridge;}div#titlebar{margin: 0 auto;width: 900px;border: 0;}div#coinborder{margin: 0 auto;position: relative;top: -151px;}div#menubar{width: 796px;background: black;text-align: center;position: relative;top: -697px;left: 34px;z-index: -1;padding: 5 5 2 5;}div#intro{width: 796px;background-color: gray;position: relative;top: -680px;left: 34px;opacity: 0.5;filter: alpha(opacity=50);}div#intro p{font-weight: bold;width: 500px;}div#toDateInfo{width: 796px;background: gray;position:relative;top: -315}div#main{width: 800px;position: relative;top: -280;text-align: left;}p.center{text-align: center;} There is nothing special about the html...just a div id'd "intro" containing a basic paragraph. Everything else seems to be working fine. Link to comment Share on other sites More sharing options...
jlhaslip Posted February 14, 2009 Share Posted February 14, 2009 Using IE???http://www.quirksmode.org/css/opacity.htmlCheck here also.http://www.mandarindesign.com/opacity.html Link to comment Share on other sites More sharing options...
therschbach Posted February 14, 2009 Author Share Posted February 14, 2009 I'm using IE7 and I have all 3 versions of the code there.I checked firefox and the opacity works, however, now I have a problem with things aligning correctly. I knew I was doing something wrong. Anyway, I don't understand why I can see things that are semi-transparent in IE7 like all the examples in the second link you sent me, but I can't see it in my own code. Link to comment Share on other sites More sharing options...
therschbach Posted February 14, 2009 Author Share Posted February 14, 2009 *sigh* I checked Opera as well and it loaded the opacity ok too. I have some javascript on my page which IE considers activex or something, and thus far I hadn't messed with clicking the drop down banner to load the activex. Well, as soon as I did that, the opacity loaded. Problem solved. Now I just have to figure out why the items are lining up differently in all 3 different browsers. But that's another topic for another day. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.