Except where otherwise noted, the contents of this document are Copyright © Marty Stepp, Jessica Miller, and Victoria Kirst. All rights reserved. Any redistribution, reproduction, transmission, or storage of part or all of the contents in any form is prohibited without the author's expressed written permission.
thanks to former TAs Victoria Kirst, Jeff Prouty, Morgan Doocy, Brian Le for their work on these labs.
Today you'll style a "Victoria's Journal" page. Before you leave, check in with a TA.
(The next 3 slides describe this exercise. Please read them all, then start.)
First download the following HTML file by right clicking on the link and selecting Save as...
Then open it in your text editor, and also open the HTML page on your hard drive in Firefox. Then move on to the next slide.
(See example screenshot on next slide.)
Organize journal.html by adding ids, classes, spans and divs. Then, add borders around these sections by editing your layout.css.
5px thick and solid.
red.
id and class attributes, consider using CSS context selectors.
The only major changes to make to the HTML are adding ids, classes, divs, and spans.
Your page should look like this when you are done:
(See example screenshot on next slide.)
Add padding, margins, and backgrounds to the page. Change only your layout.css file.
white.#E8FBFB.
5px (on all sides) and margin of 10px only on the top of the box.
10%, and the following background image:
(right-click and choose "Inspect Element" to find out its URL!)
This example is Victoria's page with padding/margins and backgrounds:
(See example screenshot on next slide.)
Now we'll practice float, clear, and alignment. You may have to edit journal.html code as well as layout.css.
bleedinto the other content below it.
This example is Victoria's page with floating and alignment:
(See example screenshot on next slide.)
#C2E9E9, with a 15px rounded border radius.
#A8F0F0, and get rid of its border.
So fresh and so cleanarea to 14pt, and get rid of its border.
This example is Victoria's beautified page:
lab2 within your html area.
Ask a TA if you have any problems logging in to Webster or uploading your files!
(See example screenshot on next slide.)
Add a second column to the layout. Copy and paste the following code into journal.html:
<h1>Friends</h1>
<ul>
<li><a href="http://www.cs.washington.edu/154/">154 Buddies</a></li>
<li><a href="http://www.willsmith.net/">Big Will</a></li>
<li><a href="http://youtube.com/watch?v=mZHoHaAYHq8" title="Conan the Librarian">Conan the Librarian</a></li>
</ul>
liquidlayout -- that is, all parts of it should adjust in size accordingly when the browser size changes.
This example is Victoria's page with the friends list:
Write your page so that if you hover over any element (i.e. any header, paragraph, image, etc), the element is highlighted in yellow.
This must be a one-selector, one-property addition to your stylesheet -- no commas allowed! How can one rule apply to all elements? Google away! (Tricky.)
The new CSS version 3 introduces borders with rounded corners.
If you finish all the exercises, you can add any other content or styles you like to your page.
If the lab is over or almost over, check with a TA and you may be able to be dismissed.
Great work!