Hi,
I'll try to answer my own question....please correct me if you know a
better way:
I created two panels - one large one for the background image and one
smaller one within it.
In the smaller one I added my label which will hold the text.
I then set the background image of the larger panel to my database image.
I set the style of the inner panel to:
background-color: #ffffff;
filter: alpha(opacity=50);
-moz-opacity: .5;
This makes the inner panel 50 per cent transparent and achieve the
desired effect.
The only problem is that it ofcourse fades the text also, so it is never
possible to achieve completely black text
Since opacity will be also applied to the children, what you can do is
take the text out of the "inner panel" hierarchy and use relative
positioning.
For example:
<div class="divBackground">
<img src="yourImage.jpg" />
<div class="divTextBackground"></div>
<div class="divText">Hello world</div>
</div>
with
.divBackground
{
}
.divTextBackground
{
position: relative;
top: -50px;
background-color: White;
filter: alpha(opacity=50);
opacity: 0.5;
height: 30px;
}
.divText
{
font-weight: bold;
position: relative;
top: -80px;
}
HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch