22.04.2013 Views

HTML, XHTML & CSS

HTML, XHTML & CSS

HTML, XHTML & 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.

32<br />

Part III: Taking Precise Control Over Web Pages and Styles<br />

What you can do with <strong>CSS</strong><br />

You have a healthy collection of properties to work with as you write your<br />

style rules. You can control just about every aspect of a page’s display —<br />

from borders to font sizes and everything in-between:<br />

✓ Background properties control the background colors associated with<br />

blocks of text and with images. You can also use these properties to<br />

attach background colors to your page or to individual elements, such<br />

as horizontal rules.<br />

✓ Border properties control borders associated with a page, lists, tables,<br />

images, and block elements (such as paragraphs). You can specify<br />

border width, color, style, and distance from element content.<br />

✓ Classification properties control how elements (such as images) flow<br />

on the page relative to other elements. You can use these properties to<br />

integrate images and tables with the text on your page.<br />

✓ List properties control how lists appear on your page, such as<br />

• Managing list markers<br />

• Using images in place of bullets<br />

✓ Margin properties control the margins of the page and margins around<br />

block elements, tables, and images. These properties extend ultimate<br />

control over the white space on your page.<br />

✓ Padding properties control the amount of white space around any block<br />

element on the page. When you use these with margin and border properties,<br />

you can create complex layouts.<br />

✓ Positioning properties control where elements sit on the page; you can<br />

use them to put elements in specific places on the page.<br />

✓ Size properties control how much space (in height and width) your elements<br />

(both text and images) take up on your page. They’re especially<br />

handy for limiting the size of text boxes and images.<br />

✓ Table properties control the layout of tables. You can use them to control<br />

cell spacing and other table-layout specifics.<br />

✓ Text properties control how text appears on a page. You can set such<br />

properties as font size, font family, height, text color, letter and line<br />

spacing, alignment, and white space. These properties give you more<br />

control over text with style sheets than the font <strong>HTML</strong> element can.<br />

Entire books and Web sites are devoted to the fine details of using each and<br />

every property in these categories. We suggest one of these references:

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

Saved successfully!

Ooh no, something went wrong!