Using the XML file you generated in Exercise #16, you will now apply what
you know about CSS by linking an external CSS file to the XML document
to format it. Create an external stylesheet to the following specifications:
- For cdcollection:
-
display: block
- background-color: #ffffcc
- width: 275px
- padding: 5px
- border: solid 1px black
- position: absolute
- top: 50px
- left: 100px
- For author:
-
display: block
-
font-size: 16pt
-
font-family: Arial
-
For date:
-
display: block
-
font-size: 16pt
-
font-family: Arial
- For cd:
- display: block
- background-color: #e4e3a5
- For cdname:
-
display: block
-
font-size: 14pt
-
font-family: Arial
-
margin-left: 30px
-
For artist:
-
display: block
-
font-size: 14pt
-
font-family: Arial
-
margin-left: 30px
-
For musictype:
-
display: none (this will hide it)
-
For song:
-
display: block
-
margin-left: 50px
- width: 200px
- background-color: #cccc99
- padding: 5px
-
For trackno:
Once you have created the external stylesheet, use the following to link
it to your XML document:
<?xml-stylesheet type="text/css" href="mystyles.css"?>
Image of the solved exercise: Exercise 17
Note: This project is to be done by hand/hard-coding. No editors!
|