fixed position : position « CSS Style « XML






fixed position



File: Data.xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="Style.css"?>
<document>
  <title>Printer's sample text</title>
   <pullQuote>
    quote
  </pullQuote>
  <paragraph>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
       nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut
       wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit
       lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor
       in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro
       dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio
       dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te
       feugait nulla facilisi. 
  </paragraph>
</document>

File: Style.css

title{
  position:fixed;
  height: 50px;
  width: 100%;
  color: #FFFFFF;
  font-size: 30px;
  font-weight: bold;
  background-color: #000000;
}
paragraph {
  display:block;
  padding:10px;
  border:solid 2px #A3A3A3;
  margin: 10px;

}
pullQuote {
  float:right;
  width:20%;
  font-style:italic;
  border:solid 1px #CCCCCC;
  padding:10px;
  margin:10px;
  background-color: #FFFFFF;
}

 








Related examples in the same category

1.Relative position
2.Positioning Elements Absolutely