Extending the Rule Of Thirds for Web Page Layouts
Welcome to the sixth part of a seven-part series that explains how to apply fundamental design principles to your web page layouts. In this article you’ll learn more about applying the Rule of Thirds to your designs.
From the old days, when most web sites were only a bunch of text-based documents to present, where the web is a multifaceted creature in constant evolution, many designers have created their web page layouts by using only an intuitive approach. You can attribute this to the self-taught nature of the web itself, but with all the design theory available nowadays, there are no valid excuses not to learn a couple of handy principles that permit you to build harmonious, visually appealing web sites in a truly simple manner.
In this specific case, I’m talking about he Golden Proportion and the Rule of Thirds, two popular design concepts that can be easily applied to creating aesthetically pleasant web page layouts. Naturally, if you’ve been patient enough and already read all of the articles that have preceded this one, then you probably have a clear idea of how to implement these two basic principles when developing both liquid and fixed designs.
And I’m saying this because in those tutorials, I explained how to use first the Golden Proportion and then the aforementioned Rule Of Thirds, to create some typical web page layouts, such as those comprised of two and three columns respectively. However, when it comes to working with The Rule Of Thirds, there’s plenty of room to experiment and build variations of these classic layouts. It’s possible not only to construct designs that include a left-placed side bar and a content area, but it’s perfectly feasible to swap out the positions of these elements very easily.
Based upon the intrinsic flexibility given by The Rule Of Thirds, in this sixth chapter of this series I’m going to demonstrate how to build a two-column web page layout whose side bar will be located to the right of the web document, thus producing an interesting variation of the design built in the previous article.
Now, it’s time to dispense with the preliminaries and continue exploring the Rule Of Thirds. Let’s jump in!
Extending the Rule Of Thirds for Web Page Layouts – Review: the Rule of Thirds with a two-column web page layout
Before I start explaining how to create a web page layout whose side bar will be placed to the right of the web document, first I’d like to reintroduce the example developed in the last article. It demonstrated how to produce a similar design, but in that particular case the side bar in question was positioned to the right instead.
This example was composed of only one simple (X)HTML file, which looked like this:
<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 Rule of Thirds</title>
<style type="text/css">
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;
}
#content{
margin-left: 300px;
height: 400px;
padding: 10px;
background: #fff;
}
#footer{
clear: both;
height: 100px;
padding: 10px;
background: #ffc;
}
h1,h2,p{
margin: 0;
}
</style>
</head>
<body>
<div id="container">
<div id="header">
<h1>Header</h1>
</div>
<div id="sidebar">
<h2>Subheading</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>Subheading</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="footer">
<h2>Subheading</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>
</body>
</html>
As shown above, it’s fairly straightforward to build a web page design composed of two columns by using the Rule OF Thirds. In this specific situation, the left bar of the page has been assigned a width of 300px, while the content area now has a value of 600px, which fits perfectly into the 900px width specified for the main container.
Now that you understand how the previous layout was created by using the Rule Of Thirds, it’s time to see how to generate a similar design, but this time the side bar will be placed to the left of the web document. As you might have already guessed, this process has more to do with playing a bit with CSS styles rather than with the Rule Of Thirds itself, but it’s worthwhile to take a closer look at it.
In the following segment I’m going to write a new set of CSS styles, which will create the two-column web page layout mentioned a few moments ago. Thus, if you wish to learn how this will be done, please click on the link below and keep reading.
Extending the Rule Of Thirds for Web Page Layouts – Rule of Thirds variation: inverting column positions
Since I just quickly reviewed how to use the Rule Of Thirds to build a two-column web page layout whose side bar was placed to the left of the web document, it’s time to see how this same approach can be used for inverting the position of this bar to produce a design where it will be shifted to the right side instead.
Given that, here is the group of CSS styles that will generate this whole new layout. Take a look at them:
padding: 0;
margin: 0;
background: #eee;
}
#container{
width: 900px;
margin: 0 auto;
background: #ccc;
}
#header{
height: 100px;
padding: 10px;
background: #fc0;
}
#sidebar{
float: right;
width: 280px;
height: 400px;
padding: 10px;
}
#content{
margin-right: 300px;
height: 400px;
padding: 10px;
background: #fff;
}
#footer{
clear: both;
height: 100px;
padding: 10px;
background: #ffc;
}
h1,h2,p{
margin: 0;
}
As you can see, the above CSS code is quite simple to follow. All it does is float the side bar to the right side of the web page, while the content area has been shifted to the left. Here, it’s clear to see how easy it is to generate a handy variation of the classic two-column design, while still maintaining the proportion dictated by the Rule Of Thirds.
Having already coded the CSS styles required for constructing this specific web page layout, I’m going to link the styles to the structural markup of the web document, in this way finishing the development of this practical example.
So, to see how this process will be accomplished, jump ahead and read the following section. It’s only one click away.
Extending the Rule Of Thirds for Web Page Layouts – Completing the sample web page layout
As I said in the section that you just read, the only thing that remains undone to get this web page layout complete is to link the CSS styles defined previously with the corresponding markup of the page in question. Thus, below I coded a new (X)HTML file, which gathers these two layers in one single place. Here’s how this file has been defined:
<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 Rule of Thirds</title>
<style type="text/css">
body{
padding: 0;
margin: 0;
background: #eee;
}
#container{
width: 900px;
margin: 0 auto;
background: #ccc;
}
#header{
height: 100px;
padding: 10px;
background: #fc0;
}
#sidebar{
float: right;
width: 280px;
height: 400px;
padding: 10px;
}
#content{
margin-right: 300px;
height: 400px;
padding: 10px;
background: #fff;
}
#footer{
clear: both;
height: 100px;
padding: 10px;
background: #ffc;
}
h1,h2,p{
margin: 0;
}
</style>
</head>
<body>
<div id="container">
<div id="header">
<h1>Header</h1>
</div>
<div id="sidebar">
<h2>Subheading</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>Subheading</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="footer">
<h2>Subheading</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>
</body>
</html>
It’s easy to understand the above (X)HTML file, so I’m not going to bore you with irrelevant explanations. Even so, you may want to have a look at the following screen shot, which depicts pretty accurately how this sample file is displayed on the browser:

At this moment, do you realize how easy it is to build several web page layouts using the Rule Of Thirds? I hope you do! And if you still have some doubts about the effectiveness of this approach, try to create your own layouts according to this design principle and start enjoying the benefits of a pattern that truly occurs in nature.
Final thoughts
Over the course of this sixth episode of the series, you learned how to produce yet another appealing two-column web page design by applying the Rule Of Thirds. As I explained a few moments ago, this process has to do mostly with tweaking the CSS styles of the page rather than dealing with the rule itself, but hopefully the experience has been instructive for you.
Moving forward, it’s time to talk about the topic that I plan to discuss in the last chapter of the series. So far, you may have noticed that all of the web page designs built using the Rule of Thirds were produced by calculating the correct widths for each column included in the document. This task can be pretty annoying when performed on a frequent basis.
It’s possible to simplify this process by using a technique called “background grid.” As its name suggests, this approach relies on creating a background grid image and assigning it to the <body> element of a web page. In doing so, it’s much easier to position elements within the document, since there’s a reference grid that can be used as a quick visual reference.
This useful technique will be discussed in depth in the final part of the series, so if you want to put it to work for you, don’t miss the last tutorial!



