11.11.2014 Views

Professional Web Design: Techniques and Templates, Fourth Edition

Professional Web Design: Techniques and Templates, Fourth Edition

Professional Web Design: Techniques and Templates, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

310<br />

Chapter 11 ■ Case Study: High-Content CSS <strong>Design</strong><br />

the code together or may want to break it up into separate style sheets for<br />

more of a distinct separation.<br />

Note<br />

The rules added in the second-level template have –sl appended to their names to signify that they<br />

are to be used for secondary pages.<br />

■<br />

■<br />

The a5-column-right-left-sl rule is added to the style sheet for the secondlevel<br />

template. It replaces the a5-column-right-left rule, which is the container<br />

for the center column on the homepage. The only difference between<br />

the two styles is that the content on the second-level page, which is styled by<br />

the a5-column-right-left-sl rule, adds 10 pixels of padding to the top <strong>and</strong><br />

bottom of the container to position itself with the menu <strong>and</strong> to add extra<br />

spacing on the bottom.<br />

The a5-sl-title rule is added to include the page title for secondary pages<br />

at the top of the page. This rule sets the height of the at 25 pixels,<br />

using the height property. Padding also is used to position the title from the<br />

top <strong>and</strong> left sides in the container. To ensure that the color of the bg-title.<br />

gif is continued across the screen, the shorth<strong>and</strong> background property is<br />

assigned a background color value of #DBDBDB. Because padding is used to<br />

position the text within the container, the Tantek hack is added to ensure<br />

that the height of the container is the same for both compliant <strong>and</strong> noncompliant<br />

browsers.<br />

Constructing a Second-Level Page with Two Columns<br />

The full-width second-level template included with this design is the page the<br />

designer comes to when clicking on the Menu Item 3 link in the menu.<br />

The purpose of this template is to provide a page with more white space for the<br />

designer to work with. Figure 11.16 shows what the design looks like when the<br />

final code is added to the page <strong>and</strong> the right column is removed from the design<br />

in Figure 11.16 (see Listing 11.6).<br />

Note<br />

The newly added code is bold to differentiate it from the existing code that is being built upon in this<br />

case study.<br />

Game Developing GWX

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

Saved successfully!

Ooh no, something went wrong!