Subject: [css-d] IE6 absolute positioning problems

From: Michael_Landis at capgroup.com ([email-masked])
Date: Tue, 29 Apr 2003 06:58:03 -0700

[n.b.: I've reformatted the styles for folks whose mail readers
automatically wrap text...]

Andy wrote:

> I was using an ie6 - specific hack...

> #leftsidebar {
>   position: absolute;
>   left: 0px;
>   top: 0px;
>   width: 140px;
>   background-color: white;
>   text-align: right;
> }
> /* IE6 ignores the left:0px stuff so detection needed here...*/
> * html #leftsidebar {
>   /*\*/
>   left:-150px;
>   /* */
> }

I've seen that hack identified for hiding properties in Mac IE 5, but not
IE 6. Try

* html #leftsidebar {
   /*\*/
   lef\t:-150px;
   /* */
}

This assumes that Mac IE 5 works fine with left: 0px. The escaped "t"
causes all IE versions except for 6.0 to ignore the style -- see "A
Modified SBMH" on http://css-discuss.incutio.com/?page=BoxModelHack

If Mac IE needs the same fix, remove the comments. See Edwardson Tan's
great page on comment hacks at
http://www.info.com.ph/~etan/w3pantheon/style/commentbugs.html for other
variations.

HTH,

MikeL