Add the Left Margin : Header : Basic Tags HTML CSS TUTORIALS


HTML CSS TUTORIALS » Basic Tags » Header »

 

Add the Left Margin


 

<?xml version = "1.0"?>
<!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">
   <head>
      <title></title>
      <style type="text/css">
* .left-marginal {
  position: relative;
  margin-left: 200px;
}

* .marginal-heading {
  position: absolute;
  left: -200px;
  top: 0;
  margin: 0;
}
</style>
   </head>

   <body>

  <h1>Left Marginal</h1> 
  
  <div class="left-marginal" 
  <h2 class="marginal-heading">Heading</h2> 
  move it into the left margin.
  </div> 
   </body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Basic Tags
» Header