Home arrow Style Sheets arrow Page 4 - Swapping Columns Using the Divine Ratio for Web Page Layout
STYLE SHEETS

Swapping Columns Using the Divine Ratio for Web Page Layout


If you’re a web designer who wants to learn how to create appealing and harmonious web page layouts by applying fundamental graphic design concepts like the “Golden Proportion” and “The Rule of Thirds,” keep reading. This is the third part in a series of articles that provides you with the right pointers to start implementing these principles for building aesthetically pleasant web sites.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
July 09, 2009
TABLE OF CONTENTS:
  1. · Swapping Columns Using the Divine Ratio for Web Page Layout
  2. · Review: a liquid web page layout using the Golden Proportion
  3. · Swapping the positions of web page columns
  4. · Adding some structural markup

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Swapping Columns Using the Divine Ratio for Web Page Layout - Adding some structural markup
(Page 4 of 4 )

As you may guess, to finish creating this sample web page layout, it's necessary to define a brand new (X)HTML file that includes the CSS styles coded a few moments ago, along with the corresponding markup. Based on this requirement, below I listed the signature of this file. Here it is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>2-column web page layout using the Golden Ratio</title>

<style type="text/css">

body{

margin: 0;

padding: 0;

background: #eee;

}

/* main wrapper */

#container{

width: 100%;

margin: 0 auto;

}

/* header */

#header{

padding: 0 10px 0 10px;

height: 100px;

background: #fc0;

}

/* side column */

#sidebar{

float: right;

width: 36%;

height: 400px;

padding: 0 1% 0 1%;

background: #ccc;

}

/* main column */

#content{

margin-right: 38%;

height: 400px;

padding: 0 1% 0 1%;

background: #fff;

}

/* footer */

#footer{

clear: both;

height: 100px;

padding: 0 10px 0 10px;

background: #ffc;

}

/* headers */

h1{

font: bold 1.2em "Trebuchet MS", Tahoma, Sans-serif;

color: #000;

margin: 0;

}

h2{

font: bold 1.1em "Trebuchet MS", Tahoma, Sans-serif;

color: #444;

margin: 0;

}

/* paragraphs */

p{

font: normal 11px/1.75em Verdana, Tahoma, Arial, sans-serif;

color: #666;

margin: 0 0 15px 0;

}

</style>

</head>

<body>

<div id="container">

<div id="header">

<h1>Header section</h1>

</div>

<div id="sidebar">

<h2>Side column</h2>

<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>

</div>

<div id="content">

<h2>Main column</h2>

<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>

<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>

</div>

<div id="footer">

<h2>Footer section</h2>

</div>

</div>

</body>

</html>

Here's a complementary screen shot that shows how this web page is displayed on screen:

There you have it. By this time, I'm sure you've learned how to build different kinds of web page designs that always use the Golden Proportion. As usual, feel free to edit and enhance all of the code samples included in this article. This will help you equip yourself with a more solid background in applying the Divine Proportion within your own web pages.

Final thoughts

In this third episode of the series, I demonstrated how to use the Golden Proportion to build a two-column web page layout whose side bar was positioned to the right side of the web document. As I said before, there's plenty of room to experiment by changing the order in which the columns are displayed on screen, while maintaining the correct ratio between them. Try this out, and see what happens in each case.

In the next article, I'm going to discuss how to apply another essential graphic design concept when creating a web page layout. In this case, I'm talking about the "Rule of Thirds." If you wish to know what it is and how it can be used in a real world situation, you'll have to read the upcoming part!


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
STYLE SHEETS ARTICLES

- CSS Combinators: Working with Child Combinat...
- CSS Combinators: Using General Siblings
- Intro to CSS Combinators
- CSS Semicircles and Web Page Headers
- Drawing Circular Shapes with CSS3 and Border...
- More CSS Pagination Link Templates
- CSS Pagination Links
- Animated CSS3 Image Gallery: Advanced Transi...
- CSS3 Animated Image Gallery: Transitions
- CSS3 Properties: Fixed Heights with box-sizi...
- CSS3 Properties: Altering Strokes and 3D Eff...
- CSS3 Properties: Text-Stroke
- CSS3 Transitions: Width and Height Properties
- Creating a Drop Down Menu in CSS3
- Intro to CSS Transitions

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 2 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials