Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The way I have been getting around this until the last year or so was just double wrapping divs. Setting a wrapper to have the width you want with 0 margin and padding, and then assigning the padding and margin you want to the inner div does essentially the same thing


Right, exactly, and in a complex layout that adds a significant amount of extra markup. Not to mention trying to find which of the 4 or 5 columns is the one that's breaking the width of their container and causing the last column to break below the rest. It works, and has worked for me for a long time, but it's a hack.


oh, without a doubt. I kissed the earth when I found that IE 8 supported border-box, my point was just that there were hacks around the issue before now.


I also had to do that sometimes... but it make your code a lot more complex if you use it a lot.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: