Re: [MACCAWS] Hacked code (was web standards...)
Tom Dell'Aringa <[email protected]> Wed, 7 Aug 2002 16:34:37 -0700 (PDT)
| Newsgroups | gmane.comp.web.vkit |
|---|---|
| Message-ID | <[email protected]> |
Tom, that is good information that developers need to know. I used the box model hack on my site (and I am going to try your suggestion). But the truth is - at least one of your solutions is still a hack - sure, a more elegant hack, but a hack nonetheless. I highly doubt we can push "hackless" standards/code. Essentially we're discussing the "gray area" here. And I think we want to push as much as we can into that gray area to get companies to move toward standards. We're not going to be able to go to Amazon.com (just to pick an example) and get them to move to a pure, hackless CSS validated layout. That's dreaming. They have too much functionality tied to "hacks" or outdated code. And to me this is the kicker - if we are pushing X, and X makes them LOSE functionality - the door is going to slam shut. We're still feeling our way on this issue so this discussion is great. Again, I might point to w3Schools as an example... http://www.w3schools.com/css/default.asp Tom --- Tom Gilder <[email protected]> wrote: > On Wednesday, August 7, 2002, 7:58:41 PM, you wrote: > > He has a very good point here. What I'm asking is: Should we be > pushing > > workarounds/hacks to work WITH the older browsers, or settle with > > (possibly) less visually appealing & precise layouts which ARE > cleanly > > laid out but still remain W3C compliant. > > I hate and loath CSS syntax hacks. I've been meaning to jot down in > a quick > article why I do so, but I've never got round to it. > > Basically CSS syntax hacks... > > ...are ugly as hell, and remembering which hack is which is a > nightmare. > > ...might possibly break future browsers. Who knows what parsing > bugs the > next PDA browser might have? > > ...sometimes screw up if a browser fixes the parsing bug, but > doesn't fix > other buggy behavior. > > ...are pretty much always not needed. There are better, more > elegant > alternatives for just about every hack I've seen, for > example: > > * The NS4 hack /*/*/ .notForNS4 { ... } /* */ can be > replaced > with *.notForNS4 { ... } or * span { ... }, @import, > @media { }, > media="all", importing via script, conditional comments, > etc. > > * The IE5 box-model bug can be mostly corrected by doing: > > #box { width: 500px; } > #box { padding: 10px; } > <div id="box"><div class="pad">Blah</div></div> > > Instead of the extremely yucky: > > #box { > width: 500px; > padding: 10px; > voice-family: "\"}\""; > voice-family: inherit; > width: 480px; > } > > Oh and the IE5 syntax hack doesn't work in IE6's > backwards-compatible > mode (which I always force it into by default, the > standards-mode is > far, far too buggy - > <http://tom.me.uk/2002/2/ie6css.html>). > > > I agree with Simon that additions to HTML should be kept to a > minimum to solve > browser bugs, but I prefer adding a couple of <div> or <span> > elements here and > there if it means avoiding CSS syntax hacks. > > </rant> > > -- > Tom Gilder > http://tom.me.uk/ > > ===== var me = tom.pixelmech.webDeveloper(); http://www.pixelmech.com/ http://www.maccaws.com/ [Making A Commercial Case for Adopting Web Standards] __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com