[thelist] Hiding CSS from everything but IE6/Win? [SOLVED]

Boris Mann boris at bmannconsulting.com
Sun Aug 10 16:09:27 CDT 2003


On Sunday, August 10, 2003, at 07:19 AM, Egor Kloos wrote:

>> The short story is that I think I need a way to hide one bit of CSS 
>> from everything *except* for IE6/Win.

I knew this was a bad idea from the beginning, but it was late, and I 
couldn't think of anything else.

> I checked your site and saw that it indeed doesn't work. I did a quick 
> check in Safari v85, and moz. firebird 0.61 osx. The style sheet just 
> puts the main content area over the left side navigation. Your problem 
> has nothing to do with IE6. In part you are using way to much css to 
> 'just switch a font'.

Everything works now. The trick is that in everything other than 
IE6/Win, if you put in position: absolute -- but then don't add any 
left/right rules -- the block stays in the flow wherever it happens to 
be in the source.

For IE6/Win then, I needed to put in left: 10px to put it in the 
correct position (which works fine for other browsers). However, this 
is NOT overridden by a rule that says right: 10px (placing the block on 
the other side). I don't know if this is correct behaviour -- I would 
think that rules of left/right or top/bottom would override each other.

> Don't import the base script, put that somewhere else. Only switch 
> what needs switching, in this case rules containing fonts and the 
> position of the two boxes. Start simple, make it work and build from 
> there.

My solution was much like this. I took all the left/right positioning 
out of the base script, imported the base at the beginning of each 
style, then added in the positioning as needed. Should work fine now 
for all newer browsers.

Now I can do something more interesting than "just switching a font".

Thanks to those that replied,

--
Boris Mann
http://www.bmannconsulting.com



More information about the thelist mailing list