This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > October 2007 > Do I have this right?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Do I have this right?
salmobytes

2007-10-09, 6:17 pm

IE6 (still with a large market share) doesn't automatically update
itself, so it remains static
annoyingly broken for CSS positioning purposes. Worse, developers can
no longer count
on the Holly Hack to trick IE into usable layout compatibility because
IE7 is now here, which will
now support the more advanced DOM selectors.

So now--in order to do things like write pure or almost pure css
dropdown menus--that rely
on advanced positioning techniques and child and sibling selectors--
without losing the
lagging IE6 market share--one solution (at least) is to pepper your
html code with Microsoft
specific [if IE6.0] like browser-sniffing statements, that could be
used to wend your way through
the increasingly tricky "which IE is it" mine field.

This could lead to a maintenance nightmare, at first glance anyway.
But if the bulk of you HTML code is generated from perl, php, python,
java or ruby anyway,
maybe it's not such a big deal. When ever something in the IE world
changes, you rewrite
a few lines of code and regenerate your site.

Are there any other solutions (besides [if IE] crap inside your
html)?
I'll get this straight eventually.

(I made a site with dropdown menus yesterday. It took me a few hours
to splice
together my own version of dropdown menus, using code snippets from
mindjar,
suckertree and positonevertything--that worked just fine in Firefox,
Safari and IE7.
I'm still struggling to get it working in IE6).

Harlan Messinger

2007-10-09, 6:17 pm

salmobytes wrote:
> IE6 (still with a large market share) doesn't automatically update
> itself, so it remains static
> annoyingly broken for CSS positioning purposes. Worse, developers can
> no longer count
> on the Holly Hack to trick IE into usable layout compatibility because
> IE7 is now here, which will
> now support the more advanced DOM selectors.

[snip]
> Are there any other solutions (besides [if IE] crap inside your
> html)?
> I'll get this straight eventually.



html>/**/body table.stattable { ... }
salmobytes

2007-10-09, 6:17 pm

On Oct 9, 5:54 am, Harlan Messinger
<hmessinger.removet...@comcast.net> wrote:
> html>/**/body table.stattable { ... }


....that was too subtle for me.

Thomas Mlynarczyk

2007-10-09, 6:17 pm

Here's what I use to deal with the situation:

HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
....
<link rel="stylesheet" type="text/css" href="common.css">
<!--[if IE]><link rel="stylesheet" href="ie.css"><![endif]-->

common.css:

- only standards compliant, "clean" CSS for all browsers
- no hacks

ie.css:

- special additional CSS rules for IE (all versions) to make it behave
- as it is "seen" only by IE/Win, I can use all the M$ proprietary stuff I
like, such as "Whatever:hover" (http://www.xs4all.nl/~peterned/) to make IE
6 support :hover on all elements, not just links
- to address only specific IE versions within this file, I use the
following:

+ All versions:
selector { property: value; }

+ IE 5 and 6 only:
* html selector { property: value; }

+ IE 6 and 7 only:
selector { pro\perty: value; }

+ IE 5 only:
* html selector { property /* IE5 */: value; }

+ IE 6 only:
* html selector { pro\perty: value; }

+ IE 7 only:
html>body selector { property: value; }

(Note that you MUST use a doctype that triggers standards compliant mode in
IE.)

Greetings,
Thomas


Harlan Messinger

2007-10-09, 6:17 pm

salmobytes wrote:
> On Oct 9, 5:54 am, Harlan Messinger
> <hmessinger.removet...@comcast.net> wrote:
>
> ...that was too subtle for me.
>


It's a hack for hiding whatever replaces the ... from IE7 as well as
IE6. Sorry, I should have left out the table.stattable part, though--I
just copied this wholesale from notes of mine. The point is to use, for
example,

html>/**/body .myclass { ... }

instead of just

..myclass { ... }

to hide the styles from IE7 and below.
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews