Width by pixel : width « CSS Style « XML






Width by pixel


File: Data.xml

<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="Style.css" ?>
<page>
   <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

page {
  display:block;
  width:470px;
  height: 400px;
  padding:10px;
  border-style:solid; border-width:2px; border-color:#000000;}

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

1.Width by percentage