Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

64 users online



browser detection for different css

browser detection for different css

Currently viewing this thread: 1 (0 members and 1 guests)


Page 1 out of 2
MrKill

MrKill

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? Smile

___________________

400MB space | 5GB bandwidth | free domain name | PHP/MySQL | $4.95/mo

OMG WHATS THIS?!?!?!?!?

sparky

sparky

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

vek

vek

die();
Status: Offline!

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--

MrKill

MrKill

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?!?!?!?!?

vek

vek

die();
Status: Offline!

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--

MrKill

MrKill

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?!?!?!?!?

wankeye

wankeye

no
Status: Offline!

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

MrKill

MrKill

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?!?!?!?!?

wankeye

wankeye

no
Status: Offline!

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)

MrKill

MrKill

I'm the best and worst at everything !
Status: Offline!

sooo how do i fix it?

___________________

400MB space | 5GB bandwidth | free domain name | PHP/MySQL | $4.95/mo

OMG WHATS THIS?!?!?!?!?

Page 1 out of 2
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0081 seconds.