HighDots Forums  

[if lte IE 6] explained (for dummies)

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss [if lte IE 6] explained (for dummies) in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
salmobytes
 
Posts: n/a

Default [if lte IE 6] explained (for dummies) - 10-25-2007 , 12:17 PM






I'm a (mostly database) programmer trying to learn how to
make websites professionally (so I don't know much but I can learn).

Everybody I work with seems to want dhtml dropdown menus.
Pure javascript menus are invisible to search engines.
So css/javascript hybrids (that are visible to search engines....
like the code I've found at positioniseverything and suckertree) are
better.

But to make this sort of dynamic positioning work in IE6, IE7, Firefox
and Safari takes a little black magic.

The only way I've been able to do this is to define css
for Firefox, which usually works in Safari as well.
And then I have to override that inside the document's head
with Microsoft-specific code:

[if lte IE 6] ...then redefine everything for IE6
and
[if gt IE 6] statements ....then redefine everything for IE7

This seems to work. But I have no idea why these
differences exist and work as they do. I'd rather not reach
these solutions by trial and error.

PUNCHLINE:
Does anybody know of a good online explanation of the browser
differences, so I could someday understand how and why IE6,
IE7 and Firefox/Safari are so far apart?....and so I could write
code with a plan, rather than stabbing by trial and error?


Reply With Quote
  #2  
Old   
Brendan Gillatt
 
Posts: n/a

Default Re: [if lte IE 6] explained (for dummies) - 10-25-2007 , 12:26 PM






-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

salmobytes wrote:
Quote:
PUNCHLINE:
Does anybody know of a good online explanation of the browser
differences, so I could someday understand how and why IE6,
IE7 and Firefox/Safari are so far apart?....and so I could write
code with a plan, rather than stabbing by trial and error?

IMHO:
* IE6 never was designed to do CSS properly at all and is therefore
crippled.

* Firefox came along and is now trumping IE6 with conformance, though it
still has a few bugs and doesn't do all CSS

* IE7 kinda works a little better, though still not as good as Firefox.

* Opera has pretty good rendering (which of course is blindingly fast)
though for some reason doesn't do dotted borders well.

* Safari has just about the best CSS support out there at the moment. It
nearly completely covers CSS2 and I don't think I've ever come across any
bugs. Shame it's so damn slow on windows though!

My suggestion to you is to write code for the better conforming browsers
(Safara, FF & Opera), testing each part on IE6 & IE7 as you go - there's
usually a workaround available for the particular bug you happen to trip
over.

W3schools provides information about which tags and styles are supported
by which browsers, though it doesn't mention how well.

- --
Brendan Gillatt
brendan {at} brendangillatt {dot} co {dot} uk
http://www.brendangillatt.co.uk
PGP Key: http://pgp.mit.edu:11371/pks/lookup?...rch=0xBACD7433
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD4DBQFHINHBkA9dCbrNdDMRAr+cAKCMt47/tAG0uVt1n0WzNhbSsvrPfQCWKOKE
0wWFZVxEhC0zHu+9zO1ZCw==
=b4Rw
-----END PGP SIGNATURE-----


Reply With Quote
  #3  
Old   
Joshua Cranmer
 
Posts: n/a

Default Re: [if lte IE 6] explained (for dummies) - 10-25-2007 , 04:48 PM



salmobytes wrote:
Quote:
Does anybody know of a good online explanation of the browser
differences, so I could someday understand how and why IE6,
IE7 and Firefox/Safari are so far apart?....and so I could write
code with a plan, rather than stabbing by trial and error?
Read the CSS spec, and you will find that it is far from easy to
implement. The original CSS 2 spec was underdocumented, and, though CSS
2.1 does a much better job, it still takes several reads to actually
understand everything thoroughly.

Add into account that HTML is mostly left specified up to the user
agent, and sufficiently underspecified element tags can have variable
renderings.

All browsers can be reduced into a few categories: legacy browsers
(IE5.5-, NN6- (?)) whose support for CSS is very low; IE6/7, where CSS
is given short shrift; and the mostly-compliant browsers (FF, Safari,
Opera, KHTML, and even more).[*]

Of the last group, each browser has specific areas where their CSS
support comes out top. Opera, AFAIK, is the only browser with a
semblance of Aural stylesheet support. Firefox is compliant (?) with the
current CSS 3 Columns WD. In general, the three browsers should be
mostly similar in terms of CSS support, especially at the level that
most developers are going to be working with.

IE6 and IE7 are plagued with nagging security problems that for some
reason seem to trump CSS concerns. IE 6's grave error is that it is the
only major browser with a relatively ancient release. IE 7 has more
support for CSS (MS's CSS team is actually highly cooperative in the CSS
WG), but it is limited in that CSS is not exactly top in the list for
allocating resources.

Legacy browsers -- especially IE 5.5 -- should probably not be
considered when working on CSS. Their usage levels are so pitiful, and
they are so obsolete, such that the required effort to get them working
is not sufficiently beneficial.

As for a plan, first ensure that you have an HTML 4.01 doctype
(transitional or strict, it doesn't matter all that much). Then, try
developing for FF, Opera, or Safari, whichever is your most-used
browser. After that is working, then try to figure out how well IE6 and
IE7 support it and try to accommodate them.

Note that many people also take great umbrage with conditional comments,
for various reasons. The only alternative is CSS hacks, which I do not
find particularly appealing either. My preferred method is to just find
a balance that works well in FF/Opera/Safari/etc. and degrades
gracefully for IE6/IE7.
[*] Well, there are also stuff like text browsers, but that is a whole
other can of worms in itself, so I won't go there unless you
specifically request it.

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth


Reply With Quote
  #4  
Old   
salmobytes
 
Posts: n/a

Default Re: explained (for dummies) - 10-25-2007 , 05:14 PM



On Oct 25, 3:48 pm, Joshua Cranmer <Pidgeo... (AT) verizon (DOT) invalid> wrote:
Quote:
As for a plan, first ensure that you have an HTML 4.01 doctype
(transitional or strict, it doesn't matter all that much).


.....didn't know that was the best cross-browser css choice. I do a lot
of
java swing interface to xml database (unrelated to my web endeavors)
so I've been using XHTML transitional as a doc heading.
....and self-closing my input, link and br and hr tags, etc.

I hope that isn't verbotten in HTML 4.01 transitional.
I'll have to give it a try.



Reply With Quote
  #5  
Old   
Joshua Cranmer
 
Posts: n/a

Default Re: explained (for dummies) - 10-25-2007 , 06:14 PM



salmobytes wrote:
Quote:
On Oct 25, 3:48 pm, Joshua Cranmer <Pidgeo... (AT) verizon (DOT) invalid> wrote:
As for a plan, first ensure that you have an HTML 4.01 doctype
(transitional or strict, it doesn't matter all that much).


....didn't know that was the best cross-browser css choice. I do a lot
of
java swing interface to xml database (unrelated to my web endeavors)
so I've been using XHTML transitional as a doc heading.
...and self-closing my input, link and br and hr tags, etc.
Well, the catch is this: IE is known to barf on anything served as
application/xhtml+xml or friends. Proper XHTML requires being served as
that content type or embedded in another XML file, neither of which is
feasible in IE.

That said, chances are you are going to be violating the standards one
way or the other. <br /> isn't valid HTML, but all browsers will accept
that (and probably will not accept the valid version, <br/). You can
either accept that your HTML is not going to be properly well-formed or
violate MIME-type standards.

If you have been using XHTML, it's fine if you keep using that, as no
browsers will barf on that, AFAIK.


--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth


Reply With Quote
  #6  
Old   
Johannes Koch
 
Posts: n/a

Default Re: explained (for dummies) - 10-26-2007 , 03:26 AM



Joshua Cranmer schrieb:
Quote:
br /> isn't valid HTML
It is, but using SGML rules it means '<br>>'.

Other constructs like '<link />' (meaning '<link>>') or '<meta />'
(meaning '<meta>>') are invalid, as character data ('>') is not valid in
head elements.

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


Reply With Quote
  #7  
Old   
Evertjan.
 
Posts: n/a

Default Re: explained (for dummies) - 10-26-2007 , 03:36 AM



Johannes Koch wrote on 26 okt 2007 in
comp.infosystems.www.authoring.stylesheets:

Quote:
Joshua Cranmer schrieb:
br /> isn't valid HTML

It is, but using SGML rules it means '<br>>'.
Why should we use "SGML rules"?

Quote:
Other constructs like '<link />' (meaning '<link>>') or '<meta />'
(meaning '<meta>>') are invalid, as character data ('>') is not valid in
head elements.



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Reply With Quote
  #8  
Old   
Pavel Lepin
 
Posts: n/a

Default Re: explained (for dummies) - 10-26-2007 , 03:58 AM




Evertjan. <exjxw.hannivoort (AT) interxnl (DOT) net> wrote in
<Xns99D56BE9B2E0Beejj99 (AT) 194 (DOT) 109.133.242>:
Quote:
Johannes Koch wrote on 26 okt 2007 in
comp.infosystems.www.authoring.stylesheets:
Joshua Cranmer schrieb:
br /> isn't valid HTML

It is, but using SGML rules it means '<br>>'.

Why should we use "SGML rules"?
Um, because it says so in the goddamn *spec*? In fact, it
already says so in the goddamn *abstract* of the spec:

HTML 4 is an SGML application conforming to International
Standard ISO 8879 -- Standard Generalized Markup Language
[ISO8879].

<http://www.w3.org/TR/html401/>

See 3, 4.2, 6.2, 19, 20 and B.3 for further insight.

--
It is rare to find learned men who are clean, do not stink,
and have a sense of humour. -- Liselotte in a letter to
Sophie, 30 Jul 1705


Reply With Quote
  #9  
Old   
Andreas Prilop
 
Posts: n/a

Default Re: explained (for dummies) - 10-26-2007 , 07:59 AM



On Thu, 25 Oct 2007, salmobytes wrote:

Quote:
Subject: Re: explained (for dummies)
Explained? What?

Quote:
User-Agent: G2/1.0
This silly creature deletes everything in brackets from the Subject.
When you use Google's brain-dead interface to post to Usenet,
then take care of the Subject!

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.