xviii
9
Getting Intimate with Elements
the box model
To do advanced web construction, you really need to know
your building materials.
In this chapter we’re
going to take a close look
at our building materials: the HTML elements. We’re going to put block and inline
elements right under the microscope and see what they’re made of. You’ll see how
you can control just about every aspect of how an element is constructed with CSS.
But we don’t stop there—you’ll also see how you can give elements unique identities.
And, if that weren’t enough, you’re going to learn when and why you might want to
use multiple stylesheets. So, turn the page and start getting intimate with elements.
The lounge gets an upgrade
362
Starting
with a few simple upgrades
364
Checking out the new line height
366
Getting ready for some major renovations
367
A closer
look at the box model
368
What you can do to boxes
370
Creating the guarantee style
375
A test drive
of the paragraph border
376
Padding, border, and margins for the guarantee
377
Adding a background image
380
Fixing
the background image
383
How do you add padding only on the left?
384
How do you increase the margin just on the right?
385
A two-minute guide to borders
386
Border fit and finish
389
Using an id in the lounge
396
Using
multiple
stylesheets
399
Stylesheets—they’re not
just for desktop browsers
anymore…
400
Add media queries right into your CSS
401
Exercise
Solutions
407
Dostları ilə paylaş: