Skip to content

Instantly share code, notes, and snippets.

@euyuil
Created April 1, 2014 05:11
Show Gist options
  • Save euyuil/9908080 to your computer and use it in GitHub Desktop.
Save euyuil/9908080 to your computer and use it in GitHub Desktop.
CSS: fixed-width sidebar with fluid-width content container.
<div id="content-wrapper">
<div id="content">
<!-- blah blah blah -->
</div>
</div>
<div id="sidebar">
<ul>
<!-- blah blah blah -->
</ul>
</div>
#sidebar {
width: 200px; /* sidebar width */
float: left;
margin-left: -100%;
}
#content {
margin-left: 200px; /* sidebar width */
}
#content-wrapper {
width: 100%;
float: left;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment