04.06.2013 Views

Head First HTML with CSS

Head First HTML with CSS

Head First HTML with CSS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The final test drive<br />

You’re going to add two elements to the of<br />

your X<strong>HTML</strong> in “styledform.html”, linking in the Starbuzz style<br />

sheet from Chapter 12, “starbuzz.css”, and your new style sheet,<br />

“styledform.css”. Make sure you get the order correct: link the<br />

“starbuzz.css” file first, then the “styledform.css”. Once you’ve got the<br />

two style sheets linked, save and reload your page. You should see the<br />

snazzy, styled version of the Starbuzz Bean Machine in your browser.<br />

Wow, what a difference a little style makes!<br />

The labels are<br />

aligned <strong>with</strong> the<br />

top of the form<br />

elements, and<br />

they’re aligned<br />

to the right as<br />

well. This alignment<br />

makes it easier to<br />

see which labels<br />

belong <strong>with</strong> which<br />

controls.<br />

The space between<br />

the rows makes a<br />

big difference and<br />

makes the form<br />

much easier to read.<br />

xhtml forms<br />

If you want to stretch your<br />

X<strong>HTML</strong> and <strong>CSS</strong> skills a bit, see if<br />

you can add the Starbuzz header<br />

and footer to the Bean Machine<br />

page and make the Bean Machine<br />

look really nice <strong>with</strong> those elements.<br />

The bean machine form now matches<br />

the rest of the Starbuzz site.<br />

Notice that the<br />

nested table<br />

doesn’t have a<br />

border, and the<br />

spacing is tighter;<br />

that’s because<br />

of those rules<br />

that override the<br />

properties set for<br />

the main table.<br />

you are here 631

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!