Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > CSS Hiding...

CSS Hiding...
Thread Tools
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jul 15, 2001, 07:53 AM
 
I'm working on a site where a rather important chunk of the layout pretty badly on IE4. I've decided that I can live without that layout nuance in that browser, though, so I'm working on trying to hide it from IE4.

Ordinarily, this would be no problem; I know several techniques (the infamous "Box Model Hack" for example). However, thanks to Microsoft's "genius," these same techniques all seem to hide that same bit of layout from IE5/Windows (though not IE5/Mac). I don't want to do that, obviously. So I'm left looking for some nice CSS bug in IE4 that was fixed in IE5 which I can exploit.

Anyone got any ideas?
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Jul 21, 2001, 12:56 AM
 
Could you re-explain what it is that you'd like to accomplish? If you'd like to load 2 different .CSS depending on the user's browser then just use an if statement and .indexOf to detect the users browser and document.write the <link rel.... *.css> line conditionally if it's one browser and something else if it's other browsers.
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Jul 21, 2001, 08:28 AM
 
That's what I ended up doing. I'm going to use PHP to sniff the browser on the server end and serve up a different stylsheet. Which is just as well; I was going to use PHP anyway for some other stuff.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:45 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2