3 ms·
Let's see the same thing with CSS! Oh, how far we've come...
by icedchai 13y ago
Let's see the same thing with CSS! Oh, how far we've come...
- grayrest 13y ago<style>span {display: inline-block}</style> <span style="width: 250px"></span><span style="width: calc(100% - 250px)"></span>
- stan_rogers 13y agoWhen I was a kid (well, a less decrepit and slightly less old man) and there was no calc(), we did that sort of thing with padding-left, float, and negative margin-left.
- icedchai 13y agonot bad! calc and inline-block is fairly recent, right?
- grayrest 13y agoFrom memory, calc is IE9 and inline-block is IE6. http://caniuse.com/ http://caniuse.com/ can answer these questions for you in general. If you're looking into newer layout techniques, you should also check out flexbox.