|
Posted by Gérard Talbot on 10/31/06 19:06
Ben C wrote :
> On 2006-10-31, G�rard Talbot <newsblahgroup@gtalbot.org> wrote:
>> David wrote :
> [snip]
>>> #navbody
>>> {
>>> width:100%;
>>> }
>> width:100% is a sign of over-constrained layout. If you can avoid
>> defining rigid, unflexible width. width: auto is the default value and
>> is usually good, excellent as is.
> [snip]
>>> #body
>>> {
>>> width:100%;
>> 1- Right here: over-constraining, rigid. What was wrong with width: auto
>> or no width at all?
>
> I've noticed a few people doing width: 100% in places where the computed
> value for auto width is 100% of the container anyway,
Yes, it could end up to be 100% of the available width of the container
anyway... but it might not. Often, people do not know or are unaware of
what width: auto means to begin with.
> and started
> lecturing them about it. But I wonder if this is some IE workaround, it
> seems to be such a common thing?
If the element has a border and padding (or just padding), then width:
100% of the available width of its container will create an overflow and
an horizontal scrollbar: then many people won't understand where/why/how
a scrollbar appeared.
Gérard
--
remove blah to email me
Navigation:
[Reply to this message]
|