Last Updated: February 25, 2016
· rmitchellnet

Have Element Take Up Remaining Width In Container

If you have a left floated sidebar and want the content next to it to take up the rest of the containers width rather than set a static width on it, you can use this trick.

#content { width: auto; overflow: hidden; }

Here's a quick demo: