You are here: Re: How do I do a layout with 100% width minus padding on left and right? « HTML « IT news, forums, messages
Re: How do I do a layout with 100% width minus padding on left and right?

Posted by Alan J. Flavell on 09/07/05 22:19

On Wed, 7 Sep 2005, Tony M wrote:

> suppose the best I can do is to use browser detection code

Heavens, no! If you had the skill and expertise to do that well (which I
freely admit I have not), you would be clever enough to solve the problem
with CSS alone.

I've seen countless attempts at browser detection. Every one of them was
fundamentally flawed. Many of them were worse than that.

If there's /really/ no other way (which, with some old browsers and
versions, was, I admit, inevitable for any serious work) then the kind of
approach shown in http://w3development.de/css/hide_css_from_browsers/ is
genial, in as much as it capitalises on known bugs in the browsers
themselves - so, everyone gets sent the same document (and it's
correspondingly cacheable) - your server has no need to know what browser
it's serving (so, cache proxies are no problem) - there's no need to
assume that every user has javascript enabled (which quite a few of them
surely haven't), and so: it hits every instance of the browser bug which
it targets, and causes no harm to the rest. Which is spot on.

So much for buggy browsers. But Mozilla, and other browsers based on it
(modern Netscapes, Firefox etc.) are pretty close to being specification-
conforming, so, if you can't get them to behave, you really shouldn't be
resorting to techniques intended for buggy browsers. At least, not until
Bugzilla tells you that indeed it's an acknowledged bug (of which there
now seem to be relatively few - compared to the considerable number of
non-bugs reported by well-intentioned but misguided authors when they
found Mozilla doing what they asked for, instead of what they hoped for!).

best wishes

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация