Hacker Times
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
bzbarsky
on Feb 16, 2012
|
parent
|
context
|
favorite
| on:
* { box-sizing: border-box } FTW
At this point the W3C is in fact working on providing such a thing. "width: calc(50% - 20px)".
Works in Firefox and IE. At some point WebKit will catch up, I assume.
kbolino
on Feb 16, 2012
[–]
I'm glad to hear that, but it's long overdue and the border-box model already solves the same problem with less markup (and most importantly, without creating an implicit dependency between the padding and width styles).
bzbarsky
on Feb 17, 2012
|
parent
[–]
Well, in all fairness calc() lets you solve a bunch of problems that border-box can't solve.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Works in Firefox and IE. At some point WebKit will catch up, I assume.