Re: Block element width behavior

David Hyatt wrote:
> Float the div.  <div style="float:left">...

Then you're running into all kinds of browser floating bugs.
      - You have to make the next element clear.
      - It doesn't work well when you already have floats
      - You can't center the result because it's floated to
        one side.

No, "display: table" is much better than that. But even better
would be adding David Baron's suggested value, 'intrinsic', to
'width' for CSS3.

(BTW, you really should trim your replies.)


Received on Friday, 14 March 2003 22:57:16 UTC