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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Building the Structure 199<br />

■<br />

■<br />

The a5-menu container contains the menu items that are styled to enable<br />

easy mouseovers. The column is given a specific width to guarantee that the<br />

first element is positioned correctly in all browsers.<br />

The a5-menu a descendant rule is used to display <strong>and</strong> style each menu item.<br />

The display property with the block value will output each item in the<br />

in its own row. The text is then left justified, assigning the text-align<br />

property a value of left. The line-height <strong>and</strong> vertical-align properties,<br />

which need to be used together for the vertical-align property to be<br />

interpreted, force the height of the menu item <strong>and</strong> how the text will be<br />

vertically aligned. The padding-left:15px; rule forces the menu items 15<br />

pixels from the left so they do not fall on the circular image at the very left<br />

of the row. Because the menu is layered over the a5-body-content background<br />

image to the right, the margin-bottom:1px; rule is added to ensure<br />

that there is transparent spacing between the menu items so the layering<br />

effect is noticeable (see Figure 9.12).<br />

One of the most important properties of this rule is the shorth<strong>and</strong> background<br />

property, which assigns a background image to a hyperlink <strong>and</strong> thus an item in<br />

the menu. This property works in conjunction with the a5-menu a:hover rule,<br />

Figure 9.12<br />

The menu items are assigned a margin-bottom value of 1px to ensure that it is apparent that the menu is<br />

layered over the background image in the a5-body-content rule.<br />

Game Developing GWX

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

Saved successfully!

Ooh no, something went wrong!