Except where otherwise noted, the contents of this document are Copyright 2010 Marty Stepp and Jessica Miller.
original lab idea and code by Victoria Kirst; revised by Brian Le and Marty Stepp
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. 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 id
s, class
es, span
s and div
s. 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 id
s, class
es, div
s, and span
s.
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:
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
.
#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 public_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/190m/">190m 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 will introduce borders with rounded corners. The CSS styles and properties for this won't pass the W3C validator yet, but they are supported in Firefox and Chrome and other browsers.
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!