DIV float: left; 6 : div layout « Tags « HTML / CSS






DIV float: left; 6

      
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"
  xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<style rel="stylesheet" type="text/css">

body {
 font-family: Arial, Helvetica, sans-serif;
 font-size: 13px;
}
#wrapper { 
 margin: 0 auto;
 width: 922px;

}
#header {
 color: #333;
 width: 900px;
 float: left;
 padding: 10px;
 border: 1px solid #ccc;
 height: 100px;
 margin: 10px 0px 5px 0px;
 background: #BD9C8C;
}
#leftcolumn { 
 color: #333;
 border: 1px solid #ccc;
 background: #E7DBD5;
 margin: 0px 5px 5px 0px;
 padding: 10px;
 height: 350px;
 width: 678px;
 float: left;
}
#rightcolumn { 
 float: right;
 color: #333;
 border: 1px solid #ccc;
 background: #F2F2E6;
 margin: 0px 0px 5px 0px;
 padding: 10px;
 height: 350px;
 width: 195px;
 display: inline;
}
#footer { 
 width: 900px;
 clear: both;
 color: #333;
 border: 1px solid #ccc;
 background: #BD9C8C;
 margin: 0px 0px 10px 0px;
 padding: 10px;
}
</style>
</head>
<body>

   <!-- Begin Wrapper -->
   <div id="wrapper">
   
         <!-- Begin Header -->
         <div id="header">
     
           This is the Header     
         
     </div>
     <!-- End Header -->
     
     <!-- Begin Left Column -->
     <div id="leftcolumn">
     
           <a href="#">Download this CSS Layout</a>  
     
     </div>
     <!-- End Left Column -->
     
     <!-- Begin Right Column -->
     <div id="rightcolumn">
           
               Right Column
     
     </div>
     <!-- End Right Column -->
     
     <!-- Begin Footer -->
     <div id="footer">
           
         This is the Footer    
          
       </div>
     <!-- End Footer -->
     
   </div>
   <!-- End Wrapper -->
</body>

</html>

   
    
    
    
    
    
  








Related examples in the same category

1.div float: left;
2.div float: left; 2
3.Two floating right div section
4.Two floating left div sections
5.Div float: none;
6.Div float: left; 3
7.Div float: left; 4
8.Div float: left; 5
9.DIV float: right;
10.div float with width and height
11.div width: 50px;
12.DIV width: auto;
13.Div width: 100%;
14.Div width: 1001px;
15.Div width: 500px;
16.DIV width: 134px;
17.Using width to control nested div boxes
18.Set width and height to DIV
19.Shrinkwrapped DIV by setting both width and height to auto
20.div height: 50px;
21.Div line-height: 23px;
22.Div line-height: 17px;
23.DIV line-height: 1.3em;
24.DIV height:1.8em;
25.DIV line-height:1.8em;
26.Using div with different height to create layout
27.Div for clearing
28.Div clear: both;
29.DIV for clear
30.DIV clear: left;
31.Div position: relative;
32.DIV position: absolute;
33.Using position: fixed; to place div tags to four corners
34.Using position: absolute; to place div tags to four corner
35.div with position: absolute; inside div with position: relative;
36.div with position: absolute; inside body
37.div position:relative;
38.Set position of DIV to absolute, to bottom 50px, to left 100px
39.Wrap tags in DIV and set the position
40.Div left: 0;
41.Div display: inline;
42.div display: table-cell;
43.Div top: 0;