[thelist] CSS: float:left
Seb
seb at poked.org
Mon Jun 2 18:35:32 2003
On Mon, 02 Jun 2003 11:55:40 -0500, Keith Dahlby <dahlbyk at softhome.netwrote:
> A real-world example would help, but you'll always encounter a problem
> when specifying widths for boxes that have a border or padding. IE
> includes borders and padding in the specified width...Mozilla (correctly)
> does not. Thus even with the left margin or absolute positioning (which
> are the only proper ways to achieve your desired effect), the display
> will still be inconsistent across browsers. HTH
<tip author="ppk" stolen-by="seb" subject="box models">
Do you hate having to code your CSS for a dozen different browser
variations on the W3C box model? Sick and tired of everybody doing things a
diffferent way?
Do you want mozilla to size boxes in the same way as IE?
You need:
-moz-box-sizing: border-box;
Just drop this handy little declaration into any style and hey-presto!
you'll find yourself not having to juggle padding and border sizes into
your IE/Mozilla box-model hack.
And now, with the improved Opera 7 and IE Mac, there's the fantasic new
box:sizing: border-box;
Straight out of the CSS3 draft specifications. This nifty little
declaration will banish those box-model blues*.
* Browser and platform restrictions may apply. See W3C site for details.
</tip>
--
http://poked.org
More information about the thelist
mailing list