Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CSS help
#1
So i've laid out my site with mostly CSS. header, 2 columns and a footer.

Here is the CSS for my main column:
#main {
float:left;
width:550px;
padding-top: 38px;
background: url(../images/ground-content.gif) no-repeat center 19px;
opacity: 0.4;
filter: alpha(opacity=40);
}

#main p {
font: 11px/16px Verdana, Arial, Helvetica, sans-serif;
text-align: left;
padding:0px 38px;
}

I have the opacity adjusted to allow the background image to show through the "ground-content.gif". It works great in mac and PC and IE even. However, it also makes my text fade too. So my question is how do I do the above, but w/o making the text transparent too?
Reply
#2
Maybe put the text into a with different css properties?
Reply
#3
yeah. i tried that. no dice.

I'm sure there is a solution. Or maybe there isn't. Its a really nice effect.
Reply
#4
That works in IE6?
Reply
#5
yeppers.

you know. except for the whole turning my text translucent too.
Reply
#6
doh! missed the filter: alpha

Try setting #main p to having an opacity and alpha of 100%.
Reply
#7
I tried this to no avail:

#main {
float:left;
width:550px;
padding-top: 38px;
background: url(../images/ground-content.gif) no-repeat center 19px;
opacity: 0.4;
filter: alpha(opacity=40);
}

#main p {
font: 11px/16px Verdana, Arial, Helvetica, sans-serif;
text-align: left;
padding:0px 38px;
opacity: 1.0;
filter: alpha(opacity=100);
}
Reply
#8
Is it a div? If so, try div#main for the first one.

If you happen to have a link to the code, that might help.
Reply
#9
here is the page...
http://www.sterilmedrepair.com/SM2/pages/dummy2.shtml

here is the stylesheet...
http://www.sterilmedrepair.com/SM2/styles/styles.css

Both are rough at this point and need refining.
Reply
#10
the #main div comes first so everything contained therein is affected by its style. Right?

So is there a way to place the image that I've got in the main div elsewhere? And then the main div can sit on top of it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)