Layout by column : column « CSS Style « XML






Layout by column



File: Data.xml

<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="Style.css" ?>
<page>
   <heading>This is a Heading</heading>
   <column1>
      <paragraph>This is a paragraph inside column one. </paragraph>
      <paragraph>This is a paragraph inside column one. </paragraph>
      <paragraph>This is a paragraph inside column one. </paragraph>
   </column1>
   <column2>
      <paragraph>This is a paragraph inside column two. </paragraph>
      <paragraph>This is a paragraph inside column two. </paragraph>
      <paragraph>This is a paragraph inside column two. </paragraph>
   </column2>
</page>

File: Style.css

heading {
  position:fixed;
  width:100%; 
  padding:20px;
  top:0px; left:0px;
  color:#FFFFFF; 
  background-color:#666666;  
  font-family:arial, verdana, sans-serif; 
  font-size:22px;
}

column1 {
  position:absolute;
  left:10px; 
  top:10px;
  width:200px;
  padding:10px;
  border-style:solid; 
  border-width:2px; 
  border-color:#CCCCCC;
}

column2 {
  position:absolute;
  left:250px; 
  top:10px;
  width:200px;
  padding:10px;
  border-style:solid; 
  border-width:2px; 
  border-color:#CCCCCC;
}

paragraph {
  display:block;
  padding-bottom:10px;
}

 








Related examples in the same category