Prev | Current Page 469 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"


Having a commented-out property/value pair in your CSS makes no noticeable difference
to file download times anyway.
In the structure section of the CSS, the #wrapper rule defines a fixed width for the page??™s
wrapper, and the margin property value of 0 auto centers the page in the browser window
(as explained in Chapter 7??™s ???Creating a fixed-width wrapper??? exercise). The #masthead
rule sets some padding at its top (to place some space above the heading), adds a singlepixel
bottom border, and adds a bottom margin, again for spacing reasons. Note that the
values within this rule, taken in combination with the height of the heading (23 pixels)
ensure that the vertical rhythm is maintained. The two other rules in the section style the
two columns, floating them, giving them fixed widths, and adding some space between
them, as per the ???Manipulating two structural divs for fixed-width layouts??? exercise in
Chapter 7.
In the fonts section of the CSS, the default font size is set using the html and body rules,
as per the ???Setting text using percentages and ems??? section in Chapter 3. The
h1.mainHeading and h1.mainHeading span rules are the image-replacement technique in
full swing, as per the ???Image-replacement techniques??? section in Chapter 3. Note the
h1.mainHeading rule??™s font-size value, which ensures that the text doesn??™t spill out from
behind the image in Internet Explorer when zooming the page. While defining font size in
pixels is generally a bad idea, it??™s largely irrelevant here, because the HTML text is only
likely to be seen if the CSS isn??™t shown.


Pages:
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481