Chris Blake wrote:
> works in safari and ff on mac. the article reckons all browsers.
>
> I just want to make a div with css applied to it to get a background
> colour appear at 50%. Any ideas?
>
You may use 1px width, height png for that, like someone said before me.
or because it doesn't work in ie6 or earlier:
i don't use hacks for ie in the global css because it not will be valid,
but i use this for ie6 and earlier versions:
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="/css/style_ie6.css">
<![endif]-->
in global css use:
|.transparent_class {
background: url('px_transparent.png') repeat top left;
}|
and in the ie6.css use:
|.transparent_class {
background: #xxxxxx; <- the color you want in background
filter:alpha(opacity=50);
}|
and now the transparency may work like you wanted to work.
or the another way:
use a little trick:
the html code structure:
<div style="position: relative">
<div class="transparent_class"></div> <!-- this div has width,
height: 100%, write in it's class what you copied from css-trick.com -->
<div style="position: absolute; top: 0px; left: 0px;">
and write here your content
</div>
</div>
I hope that helped!
Kata
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/