Re: Centering <div> in 2008
Naturally, because <div> can't hug content like tables can. They're either
100% wide, or have a static value.
Another limitation of divs that seems unnecessary to me. Why does no width
have to mean 100% width? We accept these realities as they are but never
question them. I can't think of any good reason why divs can't hug content
the way tables do, UNLESS they're specified to be 100% wide.
"David Powers" <david@example.com> wrote in message
news:g69nn1$17s$1@forums.macromedia.com...
> Walt F. Schaefer wrote:
>> margin: 0 auto;
>
> For this to work, the element (<div>) needs a declared width. Without a
> width, the element remains on the left of the page.
|