box-sizing: border-box;
...is clearly superior to our standard box model. I'm very curious about using ` * { box-sizing: border-box; } ` on all sites supporting IE8+. But I don't know if any edgecase issues have been uncovered. Anybody know?
meanwhile I'm testing..Edit
...is clearly superior to our standard box model. I'm very curious about using ` * { box-sizing: border-box; } ` on all sites supporting IE8+. But I don't know if any edgecase issues have been uncovered. Anybody know?
meanwhile I'm testing..Edit
+3
- Bob Aman, Takeru Suzuki and 1 more1 share - Steven Mautone
19 comments
.jpg)
13 Dec 2011
.jpg)
There is little value to it, IMO. Haven't seen any cases where it'd be preferable.
13 Dec 2011 - Edit
.jpg)
13 Dec 2011 (edited)
.jpg)
http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug footnotes appear to have some good links.
13 Dec 2011 - Edit
.jpg)
For applications where you want everything to be more elastic (and really for documents on the web) it doesn't make as much sense.
13 Dec 2011 (edited)
.jpg)
Though for two column text, it's mighty nice to say 50% wide columns, with 15px of inner padding. (and maybe a 1px right border on the first as a divider)
13 Dec 2011 - Edit
.jpg)
.jpg)
13 Dec 2011
.jpg)
13 Dec 2011
.jpg)
13 Dec 2011
.jpg)
13 Dec 2011
.jpg)
Truth!
I think that's actually what got me onto this track
13 Dec 2011 (edited) - Edit
.jpg)
http://www.ericmeyeroncss.com/bonus/render-mode.html
(bonus material for an old book)
The background given in the wikipedia article seems plausible:
http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug
which makes a connection between how the the css1 box model was crafted and how the padding is added to the cell width in HTML3
-- but I don't know if the article is correct.
14 Dec 2011 (edited)
.jpg)
As we have the option to switch between box models with box-sizing, then may as well have as the default the one that says the content box is the size you state as the width, and the border and padding are extra to that. Makes more logical sense to me.
14 Dec 2011
.jpg)
> We've been using *{box-sizing: border-box;} in one of my projects (deployed in production, averaging over 1M visits a month) at work for about a year now, and it seems to be holding up just fine. The project has been tested in IE8 & 9 and the latests Firefox and Chrome versions and we've had no problems as of yet (we don't officially support Opera, but I expect it to work just fine there too). All jQuery (+UI) offset calculations and animations run fine, even in any element we've displayed as inline-block. As of late we've started testing the project on mobile devices (iPhone, iPad and Android) and we've had no issues regarding box-sizing with any of them yet, so it seems to work just fine.
14 Dec 2011 - Edit
.jpg)
15 Dec 2011
Add a comment...