Hey all,
been banging my head against this one for a while. For a CSS redesign of a site I need a parent div to have a background-image followed by a p child with a transparent background, but foreground text needs to remain at 100% opacity. I tried making a 1px image of a semitransparent (40%) white, but it won't show up when used with background-image. I've verified it's not related to repeat being off.
If I go by proprietary stuff the text ends up affected as well, which doesn't work.
The site needs to switch between 2 designs so I can't move the text into another child element.
JQuery is used heavily if that can help me it would be perfect.
Markup:
CSS:
.titles
{
background-color: #FFF;
background-image: URL("../images/Vessel_TitleBackground.jpg");
padding-top: 2px;
font-weight: bolder;
text-align: left;
}
.titles p
{
text-indent: 2%;
background-color: #FFF;
filter:alpha(opacity=60);
-moz-opacity: 0.6;
opacity: 0.6;
font-size: 1.1em;
color: #000;
}
HTML:
<div>
<div class="titles">
<p>YEY</p>
</div>
<div class="contents">YEY
</div>
</div>