Home arrow Style Sheets arrow Page 3 - Using the Rule Of Thirds for Web Page Layout
STYLE SHEETS

Using the Rule Of Thirds for Web Page Layout


Have you ever wanted to expand your web design skills and learn how to make your web sites more aesthetically pleasant to your visitors? You’ve come to the right place. In this group of articles you’ll find a friendly guide that will show you how to create harmonious web page layouts by using two fundamentals concepts taken from graphic design, popularly known as the Golden Ratio (or the Golden Proportion) and the Rule Of Thirds. This is the fourth part of a seven-part series.

Author Info:
By: Alejandro Gervasio
Rating: 3 stars3 stars3 stars3 stars3 stars / 5
July 16, 2009
TABLE OF CONTENTS:
  1. · Using the Rule Of Thirds for Web Page Layout
  2. · Understanding the Rule of Thirds principle
  3. · Implementing the Rule of Thirds
  4. · The Rule of Thirds principle in web design layout

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Using the Rule Of Thirds for Web Page Layout - Implementing the Rule of Thirds
(Page 3 of 4 )

From the explanation that I gave you in the previous section, it’s easy to guess that implementing the “Rule Of Thirds” in web page creation is only a matter of coding a few simple CSS styles and the corresponding markup, and nothing else. In this specific situation, since the web document must be divided into three columns that will be assigned the same width, the CSS code required to apply the rule in question when building a fixed web page layout would look something like this:

body{

padding: 0;

margin: 0;

background: #eee;

}

#container{

width: 900px;

margin: 0 auto;

background: #ccc;

}

#header{

height: 100px;

padding: 10px;

background: #fc0;

}

#sidebar{

float: left;

width: 280px;

height: 400px;

padding: 10px;

}

#extrabar{

float: right;

width: 280px;

height: 400px;

padding: 10px;

}

#content{

margin-left: 300px;

margin-right: 300px;

height: 400px;

padding: 10px;

background: #fff;

}

#footer{

clear: both;

height: 100px;

padding: 10px;

background: #ffc;

}

h1,h2,p{

margin: 0;

}

Aside from styling some headers and paragraphs, you should pay attention to the widths assigned to the “sidebar,” “content” and “extrabar” divs, since they’re the main columns of the above web page. As you can see, each of these elements has been assigned a width of 300px, in this way dividing the web document into thirds.

In addition, it’s worthwhile to mention that in a ideal situation, it’d be recommended to divide the web page horizontally into thirds as well, but since users can modify the size of text at will, the above example uses fixed heights for the pertinent columns only for example purposes.

Well, at this point you should have a better idea of how to apply the “Rule Of Thirds” to build a fixed web page layout. Naturally, if you already have a basic background in working with CSS, the example discussed above should be pretty simple to grasp.

In the final section of this article, I’m going to complete this example by linking the previous CSS styles to the corresponding structural markup.

To see how this process will be accomplished in a simple manner, you’ll have to click on the link that appears below and read the next few lines.


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 5 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials