Style for two tags : xml stylesheet « CSS Style « XML






Style for two tags


File: Data.xml

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

File: Style.css

paragraph {
  display:block;
  padding:10px;
  border:solid 2px #A3A3A3;
  margin: 10px;

}
pullQuote,history {
  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.Link style with XML document