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: http://jsfiddle.net/rmitchellnet/v2zKm/
Written by Ryan Mitchell
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#