Skip to content

Instantly share code, notes, and snippets.

@maxxscho
Created March 10, 2015 07:47
Show Gist options
  • Save maxxscho/ec94317720c8dc436bb8 to your computer and use it in GitHub Desktop.
Save maxxscho/ec94317720c8dc436bb8 to your computer and use it in GitHub Desktop.
Fluid and fixed columns
<div id=fluid>
<div id=inner-block>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc haec primum fortasse audientis servire debemus. Ea possunt paria non esse. Id [redacted]tilius factum negabat. Duo Reges: constructio interrete.
</div>
</div>
<div id=fixed-width>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Illud quaero, quid ei, qui in voluptate summum bonum ponat, consentaneum sit dicere. Aperiendum est igitur, quid sit voluptas; Summum ením bonum exposuit vacuitatem doloris; Age sane, inquam. Verum tamen cum de rebus grandioribus dicas, ipsae res verba rapiunt; Iam doloris medicamenta illa Epicurea tamquam de narthecio proment: Si gravis, brevis; Duo Reges: constructio interrete. Haec dicuntur inconstantissime.
</div>
#fluid {
float: left;
width: 100%;
margin-right: -265px; /* The size of the fixed block. */
}
#inner-block {
background-color: #cccccc;
margin-right: 265px; /* The size of the fixed block. */
height: 500px;
}
#fixed-width {
background-color: #efefef;
float: left;
margin-left: 15px;
width: 250px; /* The size of the fixed block. */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment