Using margin to create offset for layout
<html>
<head>
<title>CSS Positioning Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type='text/css'>
/* CSS Document */
div#navigation {
float:left;
width:200px;
height:100%;
color:#ffffff;
background-color:#666666;
border:1px solid #000000;
padding:5px;}
div#content {
margin-left:213px;
width:600px;
height:100%;
background-color:#ffffff;
border:1px solid #000000;
padding:5px;}
a:link, a:visited {color:#ffffff;}
a {display:block;}
</style>
</head>
<body>
<div id="navigation">
<a href="#">Navigation item 1</a>
<a href="#">Navigation item 2</a>
<a href="#">Navigation item 3</a>
<a href="#">Navigation item 4</a>
</div>
<div id="content"><h1>Headline</h1><p>Article goes here</p></div>
</body>
</html>
Related examples in the same category