Our assignment was to display an xml document using css, and that we need to have a hyperlink that would direct to a certain webpage. We can't make the text into a hyperlink using only css, we've searched a lot and couldn't find a way to do it. We tried using xlink and still not working.
Heres our test code for xml:
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="Test1.css"?>
<topfive xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Top Movie</title>
<span></span>
<intro>Following are my favorite movie:</intro>
<item>
1. <itemLink xlink:type="simple" xlink:show="new"
xlink:actuate="onRequest"
xlink:href="http://www.amazon.com/exec/obidos/ASIN/B00004TDTO/">
Jaws</itemLink>
</item>
</topfive>
and heres the css:
topfive {
background-color: lightgreen;
}
item {
font-size: 20px;
font-weight: bold;
color: blue;
text-decoration: underline;
pointer-events: auto;
}
span:before {
content: '';
width: 100%;
height: 1em;
display: inline-block;
}