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.

230<br />

Chapter 10 ■ Case Study: Medium-Content CSS <strong>Design</strong><br />

■<br />

■<br />

The a5-body-center <strong>and</strong> a5-body rules are used to force the design to the left<br />

side of the browser screen with a fixed width of 770 pixels. If the designer<br />

wanted to fill the full width of the screen, the value of 770px would need to<br />

be changed to 100%. If, however, the designer wanted to simply justify the<br />

design to the left, the value of the text-align property in the a5-body-center<br />

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

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

is evenly split on both sides. This system allows more than one site to be<br />

built with ease <strong>and</strong> flexibility, using the same default code, allowing the<br />

designer to adjust quickly to a client’s needs.<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<br />

the tags looks like with no content added in them. Turning on<br />

the borders also helps a designer when building a site because it is not always<br />

apparent where elements are placed or where they are exp<strong>and</strong>ing. Rather<br />

than removing these rules, it is easier to change the value of 1px to 0px,<br />

turning the borders off. Troubleshooting often involves turning the borders<br />

back on because it saves times <strong>and</strong> takes up little download size to keep<br />

them in the style sheet.<br />

■<br />

Because the tag 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 useful when the page has more<br />

code added later.<br />

Adding the Left Column<br />

After the framework has been built, the left column needs to be added.<br />

This section includes the logo, menu, <strong>and</strong> bottom-left image of the design.<br />

Figure 10.5 shows what the design looks like after the code in Listing 10.2 has<br />

been added.<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!