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.

Creating a Liquid <strong>Design</strong> 437<br />

When the page is rendered, it would look like Figure 16.13. Notice that there is<br />

an even amount of space on both sides of the design.<br />

Creating a Liquid <strong>Design</strong><br />

Because of the way the fixed design was created, modifying it to be a liquid design<br />

is very simple. All the designer needs to do is change the 770px value of the<br />

a5-body rule to 100%. This is because the left column will always try to fill the<br />

screen because it is assigned relative positioning <strong>and</strong> it is included in a tag,<br />

which together defaults to 100% width. There are two main reasons the design<br />

works the way it does:<br />

■<br />

■<br />

The left column has relative positioning assigned to it, so it can exp<strong>and</strong> <strong>and</strong><br />

contract, depending on the resolution or width of the screen.<br />

While the positioning will stretch to 100% by default, it can also be controlled<br />

with the margin property. In this case, the margin-right property is<br />

set to 232px, which means the column will stretch within 232 pixels of the<br />

right side of the screen but no further.<br />

Figure 16.13<br />

Fixed-width design that is centered using CSS.<br />

Game Developing GWX

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

Saved successfully!

Ooh no, something went wrong!