2-column Layout with total width 922px, and float right : Two columns : Layout Attributes HTML CSS TUTORIALS


HTML CSS TUTORIALS » Layout Attributes » Two columns »

 

2-column Layout with total width 922px, and float right


 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style rel="stylesheet" type="text/css">
#wrapper 
 margin: auto;
 width: 922px;
}
#leftcolumn 
 color: #ccc;
 border: 1px solid #ccc;
 background:#F6F0E0;
 margin: 10px 0px 10px 0px;
 padding: 10px;
 height: 500px;
 width: 439px;
 float: left;
}
#rightcolumn 
 float: right;
 color: #333;
 border: 1px solid #ccc;
 background:#CCC;
 margin: 10px 0px 10px 0px;
 padding: 10px;
 height: 500px;
 width: 439px;
 display: inline;
 position: relative;
}
</style>
</head>
<body>

<div id="wrapper">
  <div id="leftcolumn"> Left Column </div>
  <div id="rightcolumn"> Right Column </div>
 </div>

</body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Layout Attributes
» Two columns