Peter Mount wrote:

> I've been using child selectors for CSS to work in both Firefox and 
> IE. As IE7 uses the child selectors I want to stop using them. I've 
> read about conditional comments but I'd rather not use them if I can.
>  I'd prefer a hack free way of using css for cross browser 
> compatibility and if possible I'd like to avoid conditional comments.

The old "star html" ( * html ) hack works as well as ever, and the old
@import bug is still bugging all IE/win versions...
<http://www.gunlaug.no/contents/wd_additions_12.html>
So there's no need for conditional comments for today's IE/win versions
if you don't like 'CC', but I am not saying that the available
alternatives are any better. I use them regularly though :-)

What method(s) and hack(s) you choose for cross browser "leveling" is
actually less important than how you use them. Not a single method
ensures both backwards compatibility and future proofing, but most of
them work quite well when used right - and minimal.



CSS selectors should ideally not be used to target specific browsers,
but to provide more for browsers that support more. This is known as
"progressive enhancement", and is not intended to ensure "the same look"
in old and new browser-versions.

An example is 'media queries', which are extremely useful for styling
documents based on what media they appear on and how each media is used,
but which are a recipe for future - and present - failure if they're
used as browser-targeting hacks for important stuff.

The same goes for child selectors, which are there to provide targeting
of elements based on their relations, and not for separating browsers.
Once the selectors' main use becomes one of browser-targeting, they are
doomed to fail and their proper use is diminished.



Less complex layouts do not necessarily need hacks, but most will still
need a few minor workarounds and/or additions to pull at least older
IE/win versions' rendering up at a reasonable level. Such workarounds
and additions may be found in the stylesheets or as scripts, and they
may not be easy to spot since they may be irregular use of regular
selectors and/or properties/values.

More complex layouts can hardly get past the need for hacks and
workarounds for IE/win's weaknesses and lack of standard-support. What
IE/win can't do IE/win can't do, and few will accept its failures.

Those who claim to have avoided _all_ IE/win workarounds, either have a
dysfunctional site or one with its source-code organized in a special
way to go easy on all graphic browsers. The latter often (but not
always) means the documents don't work well in non-graphic browsers, or
they are unnecessary heavy.
Most sites that claim to be hack-free, becomes dysfunctional under
minimal stress in any and all browsers. This is the same as saying that
these sites are too weak to begin with, so the claim is false all the
way through.



Drew Mclellan's blog has a very simple layout, and it does contain
workarounds for IE6. Some are even visible in IE6 when pages are loaded
first time, or with an empty cache, over a slow connection. It is
otherwise in the "as clean as they get" group, and as such it's a
reasonably good example.



If you need some sources, study the following...
<http://www.webdevout.net/browser-support>
<http://www.css3.info/selectors-test/>
<http://www.w3.org/Style/CSS/>


regards
        Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to