Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Multible CSS Files..And Browsers
Old 04-25-2005, 12:24 AM Multible CSS Files..And Browsers
Zeal's Avatar
Average Talker

Posts: 17
Location: Texas
Trades: 0
Does anyone know how to change .css files based on a browser? I found one answer, but it involved a .cgi script, and I'm using a free host. I currently have a script that redirects users to a different page for each browser, but I found that in Firefox, I need to recode some css values because it doesn't snow up the same.

Can you use javascript to do this? Or is it different? I really don't want to be 4 sets of pages for each browser, so this would be very helpful.
Zeal is offline
Reply With Quote
View Public Profile Visit Zeal's homepage!
 
 
Register now for full access!
Old 04-25-2005, 04:00 AM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
actually it's even simpler than that .

Use a correct, full and valid DTD to get IE into standards mode, design and test in Firefox and you don't need to get complicated with browser sniffers and CSS switching.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-25-2005, 05:50 AM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
If you're still interested, there's a thread here that is about browser sniffing.
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 04-25-2005, 06:18 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Try Conditional Comments?
http://msdn.microsoft.com/library/de...omment_ovw.asp
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 04-25-2005, 05:38 PM
Zeal's Avatar
Average Talker

Posts: 17
Location: Texas
Trades: 0
Ok, but you can use PHP on free hosts? I wasn't sure it allowed it.
Zeal is offline
Reply With Quote
View Public Profile Visit Zeal's homepage!
 
Old 04-25-2005, 09:15 PM
Extreme Talker

Posts: 170
Location: Canada
Trades: 0
Some free hosts do allow you to use PHP but many do not. If you're not sure then it's likely that you're host will have a customer support e-mail address or frequently asked questions section on their home page. Look around carefully.
__________________

Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
collyer_1 is offline
Reply With Quote
View Public Profile Visit collyer_1's homepage!
 
Old 04-27-2005, 06:53 PM
Zeal's Avatar
Average Talker

Posts: 17
Location: Texas
Trades: 0
So, what's the PHP work around? Just use validated CSS? Seems alright, but once I change it in Firefox, it looks different in Internet Explorer.
Zeal is offline
Reply With Quote
View Public Profile Visit Zeal's homepage!
 
Old 04-28-2005, 05:33 AM
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It is almost impossible to get a page to look identical in all browsers and various version of browsers. It is a pointless task trying. Added to that in the vast majority of sites there is no need to.

Consider it carefully, as long as it isn't completely "broken", Who is ever going to notice that an element is 3px further to the right in IE than FF. That's right, nobody but you!
The vast majority of visitors to any site you design will be using just the one browser, and it will be whatever is the default on the machine they are on. Stats from a couple of commercial sites I look after still show IE at 90-95% of browser visitors (spiders excluded).

Stop fretting about it. If it works in most browser and looks close enough why worry?
That's my philosophy.
I don't use hacks, cracks, patches, workarounds etc, simply because one day the bugs these workarounds rely on may well be fixed! what happens then? Do you have to use a workaround to workaround the previous workaround ?

just my 0.10 GBPs worth
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-28-2005, 03:35 PM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
I don't use hacks and workarounds for more or less the same reason. However I dish out code that I know works to a certain browser to that certain browser. For anything unknown, I make the assumption that it's complient.
For example, if you use IE6 and visit my site, it will dish out CSS Filters to make PNG images work. Could be considered a workaround seeing as it's technicly invalid CSS, but nobody's ever going to see it other than people who use IE6. (Except people who use user-agent switchers, but if they get a dodgey looking page then it's their own fault for being so dumb.)
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 04-29-2005, 05:44 PM
Zeal's Avatar
Average Talker

Posts: 17
Location: Texas
Trades: 0
Well, it's really more of a private website, and I didn't expect much more than 20 people to visit it, but I wanted to see if two different css files could be incorporated; one for each browser. Thanks for the help though.
Zeal is offline
Reply With Quote
View Public Profile Visit Zeal's homepage!
 
Reply     « Reply to Multible CSS Files..And Browsers
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.36126 seconds with 12 queries