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

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.



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).


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: