2-column layout with margin in between : Two columns : Layout HTML CSS TUTORIALS


HTML CSS TUTORIALS » Layout » Two columns »

 

2-column layout with margin in between


 

<!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 {
  width: 922px;
}
#leftcolumn {
  border: 1px solid #ccc;
  background: #F6F0E0;
  margin: 10px 5px 10px 0px;
  padding: 10px;
  height: 500px;
  width: 436px;
  float: left;
}

#rightcolumn {
  float: right;
  border: 1px solid #ccc;
  background: #C0C8B3;
  margin: 10px 0px 10px 0px;
  padding: 10px;
  height: 500px;
  width: 436px;
  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
» Two columns