Skip to content

Instantly share code, notes, and snippets.

@Bodacious
Created November 25, 2010 20:44
Show Gist options
  • Save Bodacious/715891 to your computer and use it in GitHub Desktop.
Save Bodacious/715891 to your computer and use it in GitHub Desktop.
CSS left, middle and right column with fixed middle
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
div{
height: 50em;
}
div.column{
width: 7em;
}
#left{
float:left;
background: red;
}
#center{
background: green;
}
#right{
float:right;
background: blue;
}
</style>
</head>
<body>
<div id="left" class="column"></div>
<!-- this should appear before 'center' -->
<div id="right" class="column">
</div>
<div id="center">
<!-- main page content goes here -->
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment