Clipping an Element : clip « CSS Style « XML






Clipping an Element



File: Data.xml
<?xml version="1.0" ?>
<?xml-stylesheet type="text/css" href="Style.css" ?>
<employees>
  <name language="English">T1</name>
  <name language="Latin">T2</name>
  <projects>
    <project>project1</project>
    <project>project2</project>
    <project>project3</project>
  </projects>
  <weight>3 points</weight>
  <length>3 years</length>
</employees>


File: Style.css
 
employees {
   display:block;
   color:black;
   background:url(rlight.jpg)
}

name {
   display:block;
   position:absolute;
   left:9;
   background:white;
   clip:rect(5 80 15 20)
}

projects {
   display:block;
   border:medium dotted red;
   padding:5;
   margin-top:10
}

project {
   display:block;
   position:relative;
   left: 125;
   width:340;
   border:thin solid red;
   padding:5; 
   margin-top:5;
   height:300;
   overflow:scroll
}

weight {
   float:right;
   width:125;
   border:thin solid green;
   padding:5;
   color:black
}

length {
   display:block
}

 








Related examples in the same category