Best Way To Support Multiple Browsers?

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
Sjwdavies
Forum Commoner
Posts: 25
Joined: Mon Nov 17, 2008 10:18 am

Best Way To Support Multiple Browsers?

Post by Sjwdavies »

Hi guys.

I'm just about to start a new site and wonder how you guys support multiple browsers?

I'm going to use a core CSS file and try to support as many browsers as possible, but for things such as IE7's double padding issue I was going to use a separate CSS included conditionally.

How do you overcome this common CSS issue?
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Best Way To Support Multiple Browsers?

Post by social_experiment »

The sanest option is to have a seperate style sheet for IE (which ever version you are coding for). Firefox, Safari, Opera, Chrome seems to have similar results when using a single stylesheet so you can use one stylesheet for them or if they misbehave just give each of them a seperate one as well.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Best Way To Support Multiple Browsers?

Post by Christopher »

One way is to use a reset style sheet. Another is to use a UI system from one of the many Javascript frameworks around that deal with these problems internally.
(#10850)
Sjwdavies
Forum Commoner
Posts: 25
Joined: Mon Nov 17, 2008 10:18 am

Re: Best Way To Support Multiple Browsers?

Post by Sjwdavies »

I always use CSS reset, they're a godsend!

Can you name one of the JavaScript frameworks your referring to?

Also, I've read about quirks mode briefly, does that sort a lot of IE errors?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Best Way To Support Multiple Browsers?

Post by Christopher »

I use jQuery and their UI is cross browser -- like most others. There are also CSS frameworks that usually implement a grid.

There are also just habits you get into, like double/triple divs for layout so you don't need to use both margin and padding. If you search around you can find a number of these CSS design strategies. Each has its own set of trade-offs. One may be to your liking.
(#10850)
thecodewall
Forum Commoner
Posts: 33
Joined: Sun Dec 26, 2010 8:37 am

Re: Best Way To Support Multiple Browsers?

Post by thecodewall »

What I did was to specify each CSS in every browser. Try to read this post:
http://codewall.blogspot.com/2010/12/sp ... wsers.html
Post Reply