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.

a new element called div<br />

Jim<br />

432 Chapter 11<br />

This looks tough, guys. There<br />

are a lot of style changes we’ve<br />

got to make, and the elixirs style<br />

doesn’t really match the rest of<br />

the page.<br />

Frank<br />

Joe<br />

Jim: Come on, Frank, you know we can just create a class or two and then<br />

style all the elixir elements separately from the rest of the page.<br />

Frank: That’s true. Maybe this isn’t so bad. I’m sure there is a simple<br />

property to make text align to the center And we know how to handle the<br />

colored text.<br />

Jim: Wait a sec, what about that border around everything?<br />

Frank: Piece of cake. We just learned how to make borders. Remember,<br />

every element can have one.<br />

Joe: Hmm, I don’t think so. If you look at the X<strong>HTML</strong>, this is a bunch<br />

of , , and elements. If we put separate borders on every<br />

element, they’ll just look like separate boxes.<br />

Frank: You’re right, Joe. What we need is an element to nest all these<br />

other elements inside, so we can put a border on that. Then we’ll have one<br />

border around everything in the elixirs section of the page.<br />

Jim: Well, I see why you get paid the big bucks, Frank. Could we nest the<br />

elixir stuff inside a element, or a ?<br />

Frank: We can’t use because can’t contain other block elements,<br />

and the headings and paragraphs are obviously block elements. I don’t<br />

think we’d want to do that anyway; paragraphs are for text.<br />

Joe: And ’s not right either, because this is an elixir menu,<br />

not a quote.<br />

Frank: Actually, I think we’re on the right track. I’ve been reading a certain<br />

book on <strong>HTML</strong> & <strong>CSS</strong> and I’m just up to a section on a new element called<br />

. I think it might be the tool we need.<br />

Joe: – what’s that? It sounds like it’s for math.<br />

Frank: That’s not far off, because a lets you divide your page into<br />

logical sections or groupings.<br />

Jim: Hey, that sounds like exactly what we need!<br />

Frank: Yup. Let me show you guys how to divide a page into logical<br />

sections, and then I’ll show you what I know about ...

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

Saved successfully!

Ooh no, something went wrong!