DIV text-align:center; : div text « Tags « HTML / CSS






DIV text-align:center;

     

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<style type='text/css'>
#footer
{
  background:#71A70B;
  clear:both;
  color:#fff;
  font-size:.9em;
  height:1.8em;
  line-height:1.8em;
  padding:0;
  text-align:center;
}

#footer a
{
  background:inherit;
  color:#fff;
  text-decoration:none;
}

#footer a:hover
{
  text-decoration:underline;
}

#footer .left
{
  margin:0 0 0 8px;

}

#footer .right
{
  
  margin:0 8px 0 0;
}
</style>
<title></title>
</head>
<body>
 
   <div id="footer">
     <span class="left">&copy; 2006 Your Site</span>

     <span class="right">Designed by <a href="">Your Name</a>| <a href="/">Web Hosting</a>
     </span>
   </div>


</body>
</html>

   
    
    
    
    
  








Related examples in the same category

1.div text-align: left;
2.div text-align: center;
3.div text-align: right;
4.Float text with DIV
5.'align' aligns text or other content within the container