04.06.2013 Views

Head First HTML with CSS

Head First HTML with CSS

Head First HTML with CSS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

more about box widths<br />

444 Chapter 11<br />

I was wondering how the<br />

width property relates to padding<br />

and margins. Is this the width of the<br />

content itself? Or the entire box<br />

including the padding and margin?<br />

The width property specifies the<br />

width for the content area only.<br />

To figure out the width of the entire box, you<br />

need to add the width of the content area to the<br />

width of the left and right margins, the left and<br />

right padding, and the border width. Don’t forget<br />

that you have to include twice the border width,<br />

because there is a border on the left and the right.<br />

left margin width<br />

border width<br />

left padding width<br />

total width<br />

width<br />

(specified<br />

in width<br />

property)<br />

Our guarantee: at the lounge, we’re<br />

committed to providing you, our guest,<br />

<strong>with</strong> an exceptional experience every<br />

time you visit. Whether you’re just<br />

stopping by to check in on email over<br />

an elixir, or are here for an out-ofthe-ordinary<br />

dinner, you’ll find our<br />

knowledgeable service staff pay attention<br />

to every detail. If you’re not fully satisfied<br />

have a Blueberry Bliss Elixir on us.<br />

right padding width<br />

border width<br />

right margin width

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

Saved successfully!

Ooh no, something went wrong!