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 Form Row by Row 381<br />

Figure 14.8<br />

How the checkbox appears in different browsers if it is not assigned the a5-disabled-checkbox class.<br />

how the checkbox looks in different browsers if it is merely assigned a background<br />

color, as with the a5-disabled-field class. It illustrates how the background<br />

color does not make up a consistent height in the left <strong>and</strong> right examples.<br />

This is why the a5-disabled-field class was created. It adds three pixels of padding<br />

to the top of the checkbox field for compliant browsers, so it appears like<br />

the left example in Figure 14.8 for all browsers. Listing 14.7 shows the code that is<br />

added to build the two rows.<br />

Listing 14.7<br />

XHTML Code for Status <strong>and</strong> Unlimited Rows<br />

<br />

Unlimited: <br />

<br />

<br />

<br />

Unlimited:<br />

<br />

<br />

Adding the Purchase Date Row<br />

The Purchase Date row shows how an image can be included to the right of the<br />

form field. It is simply placed to the right of the field, as opposed to being floated<br />

to the right. If the designer were to get more technical, it could be assigned a few<br />

pixels of padding to the top so it is placed at the same height for all browsers.<br />

A container is wrapped around the image to provide 10 pixels of padding<br />

to the left. Listing 14.8 shows the code used to render the row.<br />

Listing 14.8<br />

XHTML <strong>and</strong> CSS Code for Purchase Date Row<br />

<br />

Purchase<br />

Date:<br />

Game Developing GWX

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

Saved successfully!

Ooh no, something went wrong!