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.

Building the Structure 275<br />

rule would need to be changed from center to left. The margin-left <strong>and</strong><br />

margin-right properties in the a5-body rule ensure that the extra white<br />

space is split evenly on both sides. While this system tends to be more<br />

complex, it allows the designer flexibility when more than one site is going<br />

to be built. By adding this code to every design, it does not take much work<br />

to quickly modify a design to fit a client’s needs.<br />

■<br />

Both the a5-body-center <strong>and</strong> a5-body rules have their borders turned on<br />

using the following code: border:1px solid #000000;. For demonstration<br />

purposes, the code was added to both rules to show what the structure of the<br />

tags looks like without content added. Turning on the borders helps<br />

a designer when building a site because it is not always apparent where elements<br />

are placed or exp<strong>and</strong>ing. Rather than remove these rules, it is easier to<br />

change the value of 1px to 0px, turning the borders off rather than removing<br />

them. Troubleshooting often involves turning the borders back on, so it<br />

saves times <strong>and</strong> takes up very little download size to keep them in the style<br />

sheet.<br />

■<br />

Because the is nested inside the <br />

tag, it is indented. This allows for quicker recognition of tags that<br />

are nested inside each other, which becomes a useful technique when the<br />

page has more code added to it.<br />

Adding the Header Row<br />

Once the XHTML <strong>and</strong> basic CSS framework have been added, the header area is<br />

then added into the code. Listing 11.2 is the code that is used to create the updated<br />

page in Figure 11.6.<br />

Figure 11.6<br />

The header row that is added to the design.<br />

Game Developing GWX

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

Saved successfully!

Ooh no, something went wrong!