Irina wrote:
I've found this to be an interesting idea and wondering what other members think about it:

"When bugs become patterns - A look at CSS Hacks":
http://spaces.msn.com/members/siteexperts/Blog/cns! 1pNcL8JwTfkkjv4gg6LkVCpw!1805.entry


The idea is not new, the logic has a lot of merit (IMO), but is not commonly used, and I wouldn't recommend it. Actually this fellow doesn't do it justice: "class" is not a valid attribute of the html tag, for one, and by assigning classes based entirely on the user agent he's encouraging practices that have been debunked for some time, especially in Javascript circles. Browser sniffing is just a backwards-thinking method, compared to capability testing, which some hacks attempt to do.

His technique might be better dealt with if he assigned classes like this:

    <body class="boxWidth minHeight floatJog">

...and so forth. Of course, to do this with either server or client- side scripting still means browser sniffing, so you remain in an awkward situation.



On Sep 29, 2005, at 10:14 AM, Drake, Ted C. wrote:
I think the future of CSS is not in hacks but looking seriously into using the conditional comments. I’m saying this as someone that is trying to figure out the best approach for retrofitting older conversions.
Agreed. The major stylesheet should be standard-compliant only and hack free. Then use a conditional comment to fix up the outliers.

Conditional comments are IE statements that say if ie6 use this additional CSS file, if IE5Mac, use this style sheet, if neither: ignore this statement.
IE 5 Mac does not respond to conditional comments. However, since it is dead, its response to the Mac IE comment filters will not change and such hacks are safe.

I’m dreading the idea of inserting conditional comments into the head sections of html pages. I’d like to insert it into the main.css file that imports more sophisticated styles. I have been overwhelmed lately and haven’t been able to test any answers to this. Does anyone have a suggestion?

If you don't mind proprietary styles in your CSS, I was working on a conditional comment-like import statement that goes in the stylesheet. It worked, but Win XP SP2 allows scripting to be deactivated in the CSS as well as the regular page script, which would deactivate this technique. So I abandoned it. If anyone is interested, I suppose it still has a place in project where scripting is a requirement. Let me know if you use it.

http://www.bivia.com/sandbox/css_cc_4ie/conditional_comment_test.html

--

    Ben Curtis : webwright
    bivia : a personal web studio
    http://www.bivia.com
    v: (818) 507-6613




******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to