Marcelo de Moraes Serpa wrote:
> [...]

> What I'm thinking is to server a different css depending on the 
> client's browser. This way I could first layout the website on a more
>  standard compliant browser (FireFox) and then copy the css and start
>  fixing the layout on IE and server this new css if the user uses IE.
>  I would use http header information to detect the browser and then 
> the backend would serve the correct css file.
> 
> What do you think?

Not much.

Such ideas come up from time to time, but the base for them are getting
weaker and weaker as time goes by.

1: Many browsers can fake their identity, partly or completely. This
makes browser-detection pretty unreliable.

2: New browsers / versions may need updated detection and new
stylesheets, which may add to maintenance.

3: Can't really see any need for it with the state of standard-support
we have across browser-land today. (Yes, I know it's a bug-house :-) )


The way most of us do it is to serve one standard-based stylesheet to
all browsers, based on what the good browsers - Opera, Firefox, Safari
etc. - shows us, and then serve _corrective_ styles to IE/win since most
problems are caused by IE's bugs and lack of standard support.
The latest IE usually only needs a few corrections, not an entirely new
stylesheet.


We can use a few hacks in the regular stylesheet to deal with IE's
problems.

We can use 'conditional comments' to target IE/win and serve it one or
more additional stylesheets...
<http://www.quirksmode.org/css/condcom.html>
...which probably is the "safest" way to serve _corrective_ stylesheet
to IE/win versions. Supported by IE5.0/win and later versions.

There's also the "a bit more hack'ish" and bug-based CSS only '@import
hack'...
<http://www.gunlaug.no/contents/wd_additions_12.html>
...which separates all Trident-based browsers (IE/win) from the others.
Supported by (the bug is present in) IE5.0/win and later versions - at
least including IE7. No versioning, so that has to be dealt with inside
the extra stylesheet.


These methods won't easily fail when implemented properly (based on what
browsers actually support), since browsers can't really fake their CSS
support. They either support something completely, partially, buggy or
not at all. If we test properly we'll see which one does what.

We just have to avoid making strong predictions about future versions,
and should probably aim for 'progressive enhancement' rather than
'(dis)graceful degradation'...
<http://accessites.org/site/2007/02/graceful-degradation-progressive-enhancement/>

In short: there's rarely ever a reason to try to drag a weak browser up
to the level a good browser is at. It just has to "come out just fine"
in each browser - separately.

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

Reply via email to