473,379 Members | 1,283 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Hiding CSS from IE5 but not from IE6

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
9 2955
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Lorenzo Villari | last post by:
I premise I don't know C++ well but... I wondered what is this data hiding thing... I mean, if I can look at the header (and i need it beacuse of the class), then what's hidden? Can someone give...
2
by: coolwarrior | last post by:
Hi, 1_I want to know the difference between "data hiding" , "steganography" ,"watermarking" ,"capsulation" related to DSP. 2_There r plenty of informaion about data hiding for images on the web...
6
by: harrylmh | last post by:
Hi, I'm learning C# and I just don't quite understand the need for polymorphism. why do we need to use it? how does a base class variable holding a derived class instance do any good? Also,...
17
by: Bob Weiner | last post by:
What is the purpose of hiding intead of overriding a method? I have googled the question but haven't found anything that makes any sense of it. In the code below, the only difference is that...
9
by: bob | last post by:
Hi, I know there exists a good reason why the designers of c++ decided that function hiding should exist. But I don't know why. Can anybody provide a good reason/example of a case where function...
3
by: Nicolas Castagne | last post by:
Hi all, I have been wondering for a while why function hiding (in a derived class) exists in C++, e.g. why when writing class Base { void foo( int ) {} }; class Derived: public Base { void...
2
by: subramanian100in | last post by:
Is my following understanding correct ? Data abstraction means providing the interface - that is, the set of functions that can be called by the user of a class. Information hiding means...
17
by: rohitchawla | last post by:
i am trying to show and hide a div when onmouseover and onmouseover another div element. i am setting a setTimeout duration on onmouseout to delay the hiding of div for around two second The...
162
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you...
27
by: matt | last post by:
Hello group, I'm trying to become familiar with the information hiding design rules, and I have a lot (3) of questions for all you experts. AFAIK, a generic module has 2 files: ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.