|
|
 |
August 29th, 2007, 05:54 AM
|
#1
|
|
New Member
Join Date: Aug 2007
Location: England
Age: 23
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
One CSS for ALL browsers. Possible, or just a dream?
A brief history...
I recently had trouble with a bit of CSS that didn't like IE7, or IE7 didn't like my CSS. Either way, I had a headache. I managed to sort it out (with help from this site!  ), using
<!--[if IE7]>blahhhhhhh<!-->
/\ It was something like this, can't remember 100%
So really my question, or more of a discussion I wish to have, is that
"Is this 'good' practice?"
I mean that, ideally, I would like one CSS that is read by all browsers the same, and that all the browsers go holding hands singing and being merry whilst showing the same layout.
Is this just a dream? Or is it possible (through good CSS coding) to have one CSS for all?
Discuss/Answer/Spam...
Gooner
|
|
|
August 29th, 2007, 06:06 AM
|
#2
|
|
Highly Reputable Member
Join Date: Apr 2007
Location: Kent, England
Age: 39
Posts: 560
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: One CSS for ALL browsers. Possible, or just a dream?
Quote:
Originally Posted by Gooner
ideally, I would like one CSS that is read by all browsers the same, and that all the browsers go holding hands singing and being merry whilst showing the same layout.
|
Well yes, we would all like that but I fear it is an impossible dream, for now anyway.
I personally don't like using the 'if IE whatever' type workarounds/hacks because I think whilst we keep doing this we are just encouraging these browsers to keep doing their own thing rather than all complying to the same standard. But last time I said something like that I don't think people agreed with me, so I might be alone in this thought! I don't mind that though 
|
|
|
August 29th, 2007, 06:20 AM
|
#3
|
|
Highly Reputable Member
Join Date: Jun 2007
Location: Canterbury
Age: 21
Posts: 724
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: One CSS for ALL browsers. Possible, or just a dream?
I agree not to encourage browsers to do thier own thing but we can't have crap looking pages just cos IE6 decides that it doesn't want to display how it should.
Using conditional comments is a much safer, and updateable way of making IE do what you want it to. Using hacks is bad practice as they could mess up in other browsers or in new browsers as and when they arrive.
|
|
|
August 29th, 2007, 06:20 AM
|
#4
|
|
New Member
Join Date: Aug 2007
Location: England
Age: 23
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: One CSS for ALL browsers. Possible, or just a dream?
I also don't like to use it. Because if you're putting in exceptions for one browser, then you might get lazy and put another in for a different browser. Before you know it, you've got different CSS for each broswer! Nightmare!
Thing is though, it's not my CSS I'm working on, it's someone else who's written it. So without trawling through it all and figuring out which bit IE7 doesn't like, there's not really an easy way. Thus I was FORCED into using it...
curses...
|
|
|
September 7th, 2007, 11:34 AM
|
#5
|
|
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 29
Posts: 1,107
Thanks: 0
Thanked 0 Times in 0 Posts
|
Re: One CSS for ALL browsers. Possible, or just a dream?
Quote:
Originally Posted by VanessaJW
I personally don't like using the 'if IE whatever' type workarounds/hacks because I think whilst we keep doing this we are just encouraging these browsers to keep doing their own thing rather than all complying to the same standard.
|
I don't like using them either -- I don't like anything to do with IE; it makes me feel all dirty on the inside -- but I do use them, and they are certainly the best way to send IE special instructions ( CSS hacks are not a good alternative).
Your argument makes perfect sense. If campaigning against bad browser behaviour is the purpose of your website, then go ahead and let visitors see the horrible IE errors.
But if your website has another purpose -- such as selling a product, or attracting readership -- then you have to decide what matters more to you. Like it or not, you can expect 70% of your (potential) visitors to use IE. If the site functions or renders badly in IE, many of these visitors will leave.
Choose your battles wisely!
Quote:
|
I also don't like to use it. Because if you're putting in exceptions for one browser, then you might get lazy and put another in for a different browser. Before you know it, you've got different CSS for each broswer! Nightmare!
|
There's no need for that. Just write standards-compliant code, don't use anything too cutting edge ( CSS 3, for example), and all popular browsers except IE will render your site well.
IE is also the only browser that provides conditional comments (and thank god it does!).
Last edited by MikeHopley; September 7th, 2007 at 11:42 AM..
|
|
|
September 7th, 2007, 11:45 AM
|
#6
|
|
Highly Reputable Member
Join Date: Apr 2007
Location: Kent, England
Age: 39
Posts: 560
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0
|
Re: One CSS for ALL browsers. Possible, or just a dream?
Quote:
Originally Posted by MikeHopley
Your argument makes perfect sense. If campaigning against bad browser behaviour is the purpose of your website, then go ahead and let visitors see the horrible IE errors.
|
Haha! I love the way you put things Mike, always makes me smile, see -  Yes, I was really thinking of mass revolution - if all the web designers in the world got together and decided to stop catering to IE in that way, then IE would be forced to be more compliant! But if it's just me, then I just look like an idiot who doesn't know how to make things work across different browsers!  Ah well...
|
|
|
September 7th, 2007, 11:49 AM
|
#7
|
|
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 29
Posts: 1,107
Thanks: 0
Thanked 0 Times in 0 Posts
|
Re: One CSS for ALL browsers. Possible, or just a dream?
Quote:
Originally Posted by VanessaJW
Haha! I love the way you put things Mike, always makes me smile, see -  Yes, I was really thinking of mass revolution - if all the web designers in the world got together and decided to stop catering to IE in that way, then IE would be forced to be more compliant! But if it's just me, then I just look like an idiot who doesn't know how to make things work across different browsers!  Ah well...
|
Indeed! It's a beautiful dream -- a mass uprising of web designers, revolting against Microsoft.
|
|
|
September 7th, 2007, 11:51 AM
|
#8
|
|
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 32
Posts: 4,607
Thanks: 0
Thanked 0 Times in 0 Posts
|
Re: One CSS for ALL browsers. Possible, or just a dream?
Ahhh ... dreams are nice *staring into nothingness* 
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|