Don’t look ahead! Ask questions!
Given the following document with style sheet
<html><head><style type="text/css"><!-- body { font-size: 12px; } ul { font-size: 1.5em; } li { font-size: 0.5em; } --></style></head><body> <ul> <li>Item</li> </ul> </body></html>
how tall (in terms of number of pixels) is the word Item?
12px * 1.5 * 0.5 = 9px
Your assignment is to
in the following document:
<html><head><title></title> <style type="text/css"><!-- --></style></head> <body> <h1>Initech International</h1> <h2>Home Page</h2> <ul> <h3>Menu</h3> <li><a href="index.html">Home</a></li> <li><a href="about.html">About Us</a></li> <li><a href="contact.html">Contact Us</a></li> <li><a href="legal.html">Legal</a></li> </ul> <p>Welcome to our home page!</p> <p>We hope you enjoy your stay.</p> <p>Under construction!</p> </body> </html>
(To be inserted inside the style section.)
body { font-size: 1.25em; /* (1) */ font-family: Georgia, serif; /* (1) */ background-color: rgb(225,225,225); /* (2) */ } li { font-weight: bold; /* (3) */ } h1 { color: rgb(10,100,10); /* (4) */ } h2 { color: rgb(10,100,10); /* (4) */ } h3 { color: rgb(10,100,10); /* (4) */ } a { color: rgb(10,10,100); /* (5) */ font-weight: bold; /* (5) */ }
Your assignment is to modify your solution to the last quiz to add the necessary elements with classes/IDs such that
<h1> and <h2> are grouped together with a
slightly-darker-than-the-background gray,(Note that (4) and (6) conflict. In this case, it’s okay to have the last menu item be bold.)
Additionally, your solution should avoid repetition as much as possible. That is, if two style definitions share the same set of property/value pairs, then they should be combined.
<html><head><title></title> <style type="text/css"><!-- body { font-size: 1.25em; font-family: Georgia, serif; background-color: rgb(225,225,225); } li { font-weight: bold; } h1, h2, h3 { color: rgb(10,100,10); } a { color: rgb(10,10,100); font-weight: bold; } div#header { background-color: rgb(200, 200, 200); } li.nobull { list-style-type: none; } .warning { color: rgb(80,10,10); font-weight: bold; } --></style></head> <body> <div id="header"> <h1>Initech International</h1> <h2>Home Page</h2> </div><!--id=header--> <div id="menu"> <ul> <h3>Menu</h3> <li class="nobull"><a href="index.html"> Home</a></li> <li class="nobull"><a href="about.html"> About Us</a></li> <li class="nobull"><a href="contact.html"> Contact Us</a></li> <li class="nobull"> <a href="legal.html"class="warning"> Legal</a></li> </ul> </div><!--id=menu--> <p>Welcome to our home page!</p> <p>We hope you enjoy your stay.</p> <p class="warning">Under construction!</p> </body></html>
Author: Ryan Timmons
Last Modified: 06 August 2008 15:23:13 PDT
URL: http://uwwebpub.com/