CSS Divisions

Estimated reading: 1 minute 47 views

Divisions are a block level (X)HTML element used to define sections of an
(X)HTML file. A division can contain all the parts that make up your
website. Including additional divisions, spans, images, text and so on.
You define a division within an (X)HTML file by placing the following
between the <body></body> tags:

				
					<div>
 Site contents go here
 </div>
				
			

Though most likely you will want to add some style to it. You can do that
in the following fashion:

				
					<div id="container">
 Site contents go here
 </div>
				
			
				
					 <!--The CSS file contains this:-->
 #container{
 width: 70%;
 margin: auto;
 padding: 20px;
 border: 1px solid #666;
 background: #ffffff;
 }
				
			
Share this Doc

CSS Divisions

Or copy link