11 replies [Last post]
GOLGO-13
Offline
Enthusiast
seattle.usa
Last seen: 6 years 34 weeks ago
seattle.usa
Timezone: GMT-8
Joined: 2004-09-07
Posts: 62
Points: 27

Whats good CSS Creators?
I have a large, old, and rather complex site that I've inherited which I'm slowly working on renovating. I've made some fairly dramatic CSS and HTML changes to the UI - which need to work in all modern browsers *plus* IE 7-9.

In using IE Web Dev Tools (in IE10) I'd like to get some input on the best way to test for older versions of IE, and the Browser Mode and Document Modes are a bit confusing. What is the best way, or combination of Browser & Document Modes to test for each version of IE?

Here is the current Doctype and meta info:

HTML Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
 
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

Different combinations of browser and doc modes render differently. What is the best combination to use for each version of IE with the code snippet above?

Thanks!
Sad

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 17 hours 29 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9767
Points: 3849

IE support; gawd help us all

Until IE10, no IE is very good, and many are downright bad. Start by getting rid of the X-UA-Compatible meta element. If your code is good, not simply valid but well thought out for standards compliant versions of IE, it should not be helpful. The purpose of compatibility mode is to make their newer browsers as stupid as their older versions, so old, poorly written source will do OK on newer IEs.

IE7 is not worth supporting (it has been superseded three times over), but if you must, simply treat it as the imbecilic cousin you hide from visitors. MSFT simply applied internally many of the hacks and work-arounds we were using for IEs 5&6.

Your biggest, real issue will be making sure the page degrades gracefully in IE<10. The older versions are simply incomplete in terms of css and html support.

If, in your re-factoring, you are unable to bring the page to standards, then and only then, try compatibility mode. If v.10 breaks, you really need to edit the code more. Remember that if v.10 breaks, it is likely that Firefox, Safari, Chrome and Opera also break.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

surajnaikin
surajnaikin's picture
Offline
Enthusiast
india
Last seen: 5 years 31 weeks ago
india
Timezone: GMT+5.5
Joined: 2007-06-09
Posts: 111
Points: 72

my experience with IE

well well, I hear a lot bad mouthing for IEs, but It has been a very good experience for me when it comes to IE. What I perceived so far is that IE requires very clean version of HTML, other browser simulate being correct & they are smart enough to overcome code mistakes when it comes to output. But IE is straight forward, it wont excuse your code mistakes. I'm not so sure about JavaScript Support on IEs but when it comes to layout & output issues, I could make it work pretty well. It's Like I use to understand what IE required, when it comes to HTML & CSS.

Here is Browser Mode & Document Mode Explained.

surajnaikin
surajnaikin's picture
Offline
Enthusiast
india
Last seen: 5 years 31 weeks ago
india
Timezone: GMT+5.5
Joined: 2007-06-09
Posts: 111
Points: 72

Flowchart explaining IE Modes

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 37 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Mate? Had you ever struggled

Mate?

Had you ever struggled through IE 5/6 ?

And all browsers have 'Tag Soup' rendering engines it was a necessity when standards came into being as so many sites written poorly that browsers had to have an ability to run error correction on markup.

Anyway there is bloody good reason for all that bad mouthing you hear, IE has been the utter ****** bane of many developers lives for too long.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 17 hours 29 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9767
Points: 3849

Hi surajnaikin

I heartily agree that IE's being less error tolerant is a Good Thing. I came to html from programming (C++ and Object Pascal), and expect catastrophic failure on syntax errors. One of the early debates in html5 development was regarding error handling. I was very much for strict interpretation, that is, failure on error. I lost.

But, that's likely the only good thing I can say for IE<8. V.8 and v.9 (more a minor tick on v.8 than a major revision) were so much better than what had come before that rejoicing was heard throughout the land. But, they were lacking in css3 and html5 support. V.10 seems to have joined the modern browser world.

To describe the issues with IEs 5, 6, and 7 would require the removal of women and children to Coventry to protect their delicate sensibilities.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

surajnaikin
surajnaikin's picture
Offline
Enthusiast
india
Last seen: 5 years 31 weeks ago
india
Timezone: GMT+5.5
Joined: 2007-06-09
Posts: 111
Points: 72

yes IE6 actually taught me everything

I feel luck enough to say I had to work on IE6, the newbies work with me, I always told them you should have taken the pains to make things work in IE, unfortunately they can not. Things are much easier now. I don't say IE is good or was better, but it teaches you a lot. It does not let you win easily.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 37 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Ah yes things far TOO easy

Ah yes things far TOO easy now, youngsters have leapt on latest releases of IE as a absolute justification for not supporting older versions yet often it's not that hard to get working layouts if one has had the experience of working with these classic versions Smile it' though as you say they can't, and thus we see standards drop in general as we move further into the library, copy paste, CMS/API nature of coding where layers obfuscate and protect the coder from the real work *bah humbug*

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

surajnaikin
surajnaikin's picture
Offline
Enthusiast
india
Last seen: 5 years 31 weeks ago
india
Timezone: GMT+5.5
Joined: 2007-06-09
Posts: 111
Points: 72

exactly my point

yeah, i may sounded harsh on my words, but the point was totally different,anyway I hope 'GOLGO-13' has found the solution he is looking for, as the discussion moved to some other point though.

GOLGO-13
Offline
Enthusiast
seattle.usa
Last seen: 6 years 34 weeks ago
seattle.usa
Timezone: GMT-8
Joined: 2004-09-07
Posts: 62
Points: 27

From what I've been able to figure out...

It seems as though the IE=edge in this line:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

means that the best way to proceed with testing is to set "Browser Mode" to whatever version I'm testing for and to leave the Document mode set to "Standards (page default)" as "IE=edge" is telling Internet Explorer to use the latest standards version when rendering.

Anybody know if I'm understanding things correctly?

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 17 hours 29 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9767
Points: 3849

Reasonable, I suppose

In that case, though, there is no reason at all for the compatibility stuff to begin with. Your assessment of browser and document modes is pretty much what I do.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 37 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

@surajnaikin I love to off

@surajnaikin Smile I love to off topic threads - occasionally

@GOLGO-13 Probably been covered now but to confirm, the meta tag ought not to be in evidence in well written Standards documents it was only a bad idea of MS to enable sites to force a users browser into a particular mode, many never grasped this and started to erroneously add it in aping other sites that themselves used it erroneously etc etc.

You test by switching your IE browser - as you & Gary stated - to the various browser modes and/or document modes to simulate various IE versions, this ought to be sufficient to test your code and highlight nay issues.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me