Absolute position is in a relative position : position absolute : Layout HTML CSS TUTORIALS


HTML CSS TUTORIALS » Layout » position absolute »

 

Absolute position is in a relative position


 


<?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">
* .positioned {
  background: #ccc;
  position: relative;
}

* .absolute {
  background: #aaa;
  position: absolute;
  top: 10px;
  left: 10px;
}
</style>
   </head>

   <body>
<h1>Absolute</h1> 

<div class="positioned"this is a test
<span class="absolute">Sized Absolute</span> 
</div> 
   </body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Layout
» position absolute