K
Kurda Yon
Hi,
I would like to have a <div> with a transparent background color. In
other words I would like have a such div-box that one can see in it
the background image of my page but the image should be mixed with
(dipressed by) the background color of the div-box (let say the
background image in the div should be darker than outside of the
div).
If my explanation is not clear enough, you can see an example of what
I want here:
http://perishablepress.com/
I have managed to do that (so I see what I want) but css-validator
complains. Here is what I have:
div
{
border-style: dashed;
border-width: 2px;
border-color: #FF0000;
width: 70%;
background-image: url('div_bg.php');
opacity: .5;
filter: alpha(opacity=50);
-moz-opacity:.50;
}
And here is what css validator says:
Property opacity doesn't exist in CSS level 2.1 but exists in [css3] :
0.5
36 div Parse Error opacity=50)
37 div Property -moz-opacity doesn't exist : 0.5
51 Parse Error opacity=50)
51 Property -moz-opacity doesn't exist : 0.5
51 Property opacity doesn't exist in CSS level 2.1 but exists in
[css3] : 0.5
So, if the way I do is bad, is there any good way to do what I want (I
mean a way which css will not complain about)?
I also do not understand why the validator tries to validate my
document as "CSS level 2.1" (why not css3)?
Thank you for any help.
I would like to have a <div> with a transparent background color. In
other words I would like have a such div-box that one can see in it
the background image of my page but the image should be mixed with
(dipressed by) the background color of the div-box (let say the
background image in the div should be darker than outside of the
div).
If my explanation is not clear enough, you can see an example of what
I want here:
http://perishablepress.com/
I have managed to do that (so I see what I want) but css-validator
complains. Here is what I have:
div
{
border-style: dashed;
border-width: 2px;
border-color: #FF0000;
width: 70%;
background-image: url('div_bg.php');
opacity: .5;
filter: alpha(opacity=50);
-moz-opacity:.50;
}
And here is what css validator says:
Property opacity doesn't exist in CSS level 2.1 but exists in [css3] :
0.5
36 div Parse Error opacity=50)
37 div Property -moz-opacity doesn't exist : 0.5
51 Parse Error opacity=50)
51 Property -moz-opacity doesn't exist : 0.5
51 Property opacity doesn't exist in CSS level 2.1 but exists in
[css3] : 0.5
So, if the way I do is bad, is there any good way to do what I want (I
mean a way which css will not complain about)?
I also do not understand why the validator tries to validate my
document as "CSS level 2.1" (why not css3)?
Thank you for any help.