By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,085 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

Hiding CSS from IE5 but not from IE6

P: n/a
Hello,

Is there a way to hide CSS from IE5.0 and IE5.5, but not from IE6? I'm doing
a site in XHTML1.1 and there's that famous box model problem with IE... So
far, I've been using something like

a {width:100px;} /* width for IE */
div>a {width:90px;} /* width for correct box model */

but as IE6 uses the correct box model and still ignores the "div>a" I end up
with the wrong dimensions. And no, I don't want to force IE6 into quirks
mode via doctype.

Any ideas?

Greetings,
Thomas
Jul 20 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Thomas Mlynarczyk wrote:
Hello,

Is there a way to hide CSS from IE5.0 and IE5.5, but not from IE6?


<http://tantek.com/CSS/Examples/>
--
Anne van Kesteren
<http://www.annevankesteren.nl/>
Jul 20 '05 #2

P: n/a
Thomas Mlynarczyk wrote:
Is there a way to hide CSS from IE5.0 and IE5.5, but not from IE6?


Eric Meyer on CSS: Tricking Browsers and Hiding Styles
<http://www.ericmeyeroncss.com/bonus/trick-hide.html>

--
Stanimir
Jul 20 '05 #3

P: n/a
Thanks to both of you for the links! Sounds like it's just what I need. I'll
try it out later.

Thanks again.
Thomas
Jul 20 '05 #4

P: n/a
in news:bt*************@news.t-online.com,
Thomas Mlynarczyk typed:
Hello,

Is there a way to hide CSS from IE5.0 and IE5.5, but not from IE6?
I'm doing a site in XHTML1.1 and there's that famous box model
problem with IE... So far, I've been using something like

a {width:100px;} /* width for IE */
div>a {width:90px;} /* width for correct box model */

but as IE6 uses the correct box model and still ignores the "div>a" I
end up with the wrong dimensions. And no, I don't want to force IE6
into quirks mode via doctype.

Any ideas?

Greetings,
Thomas

you could try doing it with javascript <blinks, swings and sucks>. when
browser is IE6, simply set the class of the item to a different one.


Jul 20 '05 #5

P: n/a
In article Disco Octopus wrote:
you could try doing it with javascript <blinks, swings and sucks>.


If you know that your answer is stupid, why to mention it at all?
Especially when better answers have already been given.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

Jul 20 '05 #6

P: n/a
Thomas Mlynarczyk wrote:

Is there a way to hide CSS from IE5.0 and IE5.5, but not from IE6?


<URL:http://centricle.com/ref/css/filters/>
The box-model hack works well for individual selectors.

--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.
Jul 20 '05 #7

P: n/a
Disco Octopus wrote:
in news:bt*************@news.t-online.com,
Thomas Mlynarczyk typed:
Hello,

Is there a way to hide CSS from IE5.0 and IE5.5, but not from IE6?
I'm doing a site in XHTML1.1 and there's that famous box model
problem with IE... So far, I've been using something like

a {width:100px;} /* width for IE */
div>a {width:90px;} /* width for correct box model */

but as IE6 uses the correct box model and still ignores the "div>a" I
end up with the wrong dimensions. And no, I don't want to force IE6
into quirks mode via doctype.

Any ideas?

Greetings,
Thomas

you could try doing it with javascript <blinks, swings and sucks>. when
browser is IE6, simply set the class of the item to a different one.


Hi
Has any one mentioned conditional comments yet - I find these very useful
David
Jul 20 '05 #8

P: n/a
Also sprach kchayka:
<URL:http://centricle.com/ref/css/filters/>
The box-model hack works well for individual selectors.

Great link! Thanks!
Jul 20 '05 #9

P: n/a
Also sprach David Graham:
Hi
Has any one mentioned conditional comments yet - I find these very
useful David


I remember having heard about them, but I suppose they are less elegant than
CSS hacks. I think I will try the voice-family hack.

Thanks for the suggestion, though.
Jul 20 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.