
September 2nd, 2004
08:52 PM
I'm the best and worst at everything !
Status: Offline!
browser detection for different css
im gonna see if i can try and find it later as i dont know javascript, but i know u can write a javascript that will use a different style sheet according to the browser.
this would be useful for my site as it looks great in IE but its mssed up in firefox, netscape and opera.
the thing is, opera claims that its internet explorer, which means if i do use the script it will use the wrong style sheet...
anyone got any suggestions to get round this? or can u write me the script? 
___________________
400MB space | 5GB bandwidth | free domain name | PHP/MySQL | $4.95/mo
OMG WHATS THIS?!?!?!?!?

September 3rd, 2004
01:36 AM
I need a haircut
Status: Offline!
This sounds like a really bad idea. You're alienating those with JavaScript turned off, and while I doubt Opera identifies itself as IE, if that's true, you're also alienating Opera users. If you're using stylesheets, why not just incorporate hacks that fix bugs in different browsers?
___________________
Jon Culver Chia Pets

September 3rd, 2004
01:56 AM
you could always use php to detect it server side and link the correct style sheet based on that. search the php forum, know there is stuff in there about it, b/c i posted one before.
___________________
--Life would make more sense if I had the source code--

September 3rd, 2004
02:26 AM
I'm the best and worst at everything !
Status: Offline!
i can use php then...
opera claims that its IE for some reason...dunno why
___________________
400MB space | 5GB bandwidth | free domain name | PHP/MySQL | $4.95/mo
OMG WHATS THIS?!?!?!?!?

September 3rd, 2004
02:31 AM
In opera there is an option to identify itself as internet explorer. don't know why you would want to do that.
___________________
--Life would make more sense if I had the source code--

September 3rd, 2004
02:32 AM
I'm the best and worst at everything !
Status: Offline!
i think its set to that as default...
vek, im tryna find the post ur talking about, using php for different stylesheets.... got any ideas to narrow the search?
___________________
400MB space | 5GB bandwidth | free domain name | PHP/MySQL | $4.95/mo
OMG WHATS THIS?!?!?!?!?

September 3rd, 2004
03:42 AM
Please don't... Browser detection is a terrible idea, which hardly ever works correctly, and it really goes against what CSS was created for... Why not make stylesheets that work across all browsers instead?
___________________
DownWithGender

September 3rd, 2004
03:56 AM
I'm the best and worst at everything !
Status: Offline!
well ok then, help me: http://www.darkroseweb.tk
as u can see in IE, it looks great, but in firefox/netscape it doesnt...
can u fix it?>
___________________
400MB space | 5GB bandwidth | free domain name | PHP/MySQL | $4.95/mo
OMG WHATS THIS?!?!?!?!?

September 3rd, 2004
04:14 AM
hmmm... well... stuff like this->
#navbar
{
width: 150px;
padding: 5px;
}
is your main problem, IE registers padding differently than any other browser... check this out for an explanation/fix...
http://tantek.com/CSS/Examples/boxmodelhack.html
___________________
DownWithGender
Last edited by wankeye, September 3rd, 2004 04:25 AM (Edited 1 times)

September 3rd, 2004
04:19 AM
I'm the best and worst at everything !
Status: Offline!