Canons of page construction: The perfect proportions

It’s amazing how a well laid out book can appeal to your aesthetics or turn you off completely. It’s always best to not judge a book by its cover, but you know what? We do it anyway.

Now these days almost everyone is either stuck on a computer or glued to an e-reader, but there’s just something very fulfilling about holding a proper book in your hands. A well designed book with an appealing page layout will make a great impression the first time that will carry over to the content. So this got me thinking… Can I create a page template that anyone can use for their own work.

Before I went about doing this, I thought I’d start with what’s been around already. The canons of page construction rely heavily on not just visual aesthetic, but also a mathematical aesthetic. The proportions are often inspired by or are directly based on the Golden Ratio for many old texts and there is a very strong use of geometric shapes to get predictable results on even different sizes of parchment or paper.

I started with this image of the canon by Van de Graaf also called the “secret canon”.

The Van de Graaf canon is used in book design to divide a page in pleasing proportions. This canon is also known as the "secret canon" used in many medieval manuscripts and incunabula. The page proportions vary, but most commonly used is the 2:3 proportion. In this canon the text area and page size are of same proportions, and the height of the text area equals the page width.

What struck me the most is at how simple lines from point to point build up to create a complex layout. I took apart the design to figure out in which order the lines were drawn and afterwards, I numbered them for my own reference. Now unlike the medieval writers, I have access to Photoshop, so finding the perfect center of a layout is fairly simple. The original page designers would have used a 90 degree angle ruler to draw perfectly vertical lines from point to point using the edge of the paper as reference.

Order of the guides

Now we can translate this to an actual page we can use. Because 8.5 x 11 inches is the standard letter size in the U.S. although I have a feeling that legal size proportions (8.5 x 14 inches) would look even better if we’re doing a single page in portrait, but I went with letter size for now in landscape and translated these lines onto a blank image with a 300 dpi resolution.

Because I have the ability to find exact center later on thanks to technology, I saved the middle line for last and instead created a guide at the exact middle which was used as a reference for lines 3 and 4. By pressing the Shift key while drawing, you can create straight vertical or horizontal lines in Photoshop. I used this feature to create lines 5 and 7.

Drawing the corner to corner lines first make sense since the corners provide the perfect anchor. The center can be found in Photoshop if you’re using guides since they snap to the exact center of the image. Lines 3 and 4 can be drawn from the botton corners to the guide in the center. The “X” created by the crossing of lines 2 with 4 create a point on which to start line 5. By using the Shift key trick, we can draw a perfectly straight vertical line to the edge of the image. The point created by the intersection of the top edge and line 5 create an anchor to start line 6 which can then be drawn to the intersection of lines 1 and 3.

I also added extra lines on the bottom using the same points as reference because I want to include page numbers and a footer. I didn’t just want to copy the Van de Graaf analysis, but instead wanted to create something appealing for a book that would still look good. I started by extending the vertical lines of the text block on each side until they hit lines 1 and 2 so I can rule off of those. I can then use those to draw more lines horizontally that hit the additional guide lines as well as the other end of the text block vertical lines.

My interpretation

Now the content rectangle appears to have been elongated from the original, but I have plans for the extra space. First, I need to set the actual text region.

Layout blocks separated from the rest of the lines.

And when we momentarily hide the lines, we can see how well it will look.

Text blocks on page

Now that we have our text blocks, we can add some text to see how it will look. I’m going to use a triangle created at the bottom of the page as a reference point for the page numbers, while using the elongated rectangle from the main content as reference for a page footer/notes section. I used Century Old Style Standard as the text font and Calibri for the page numbers.

I wanted the content to look symmetrical as much as possible, so the footers are pushed to the center from both sides.

And let’s see what the final product looks like without the lines.

Looks good to me.

The great thing about using this method to find the perfect proportions is that it should be possible to do so with any paper size. You will still end up with a very nice looking layout for a book or single sheet print.

Enjoy!

Advertisement

Fluid, variable width columns in CSS

A little while ago, I made an addendum to one of my themes trying to prove a point that displaying a lot of content is possible without major HTML and CSS surgery.

But in retrospect, the approach I took, creating a separate “segment” class and having separate “content” and “sidebar” classes, seems a bit silly. It clearly violated the DRY principle since I was overlooking one important fact…

“Content” and “Sidebar” are basically columns of different width

Once I finally realized this fundamental aspect of layout presentation, then all else fell into place. Now there is no need for a “full” class since any content that doesn’t belong to a column automatically takes up the full width.  The rest of the content can be displayed by using percentages relative to the full width of the container.

The Content and Sidebar sections can now be realized by applying a 2/3rds width and 1/3rd width columns respectively and other percentages can be used to mix and match columns on any page segment.

Previously, there was also an “extras” div that was inherited from the Mod Portal theme from which this all was derived. Now this too was eliminated by using three 1/3rd width columns in a separate “body” segment.

You can see the final result of the changes and it is proportionally lighter in CSS and HTML than with the previous iteration. I also added a login/registration form since that was also originally part of Mod Portal, increased the font sizes in the navigation bar, changed some of the colors for clarity and added comments in both the HTML and CSS.

Presenting a lot of content without killing children or small animals

Three things that will help almost anyone* publish a lot of content on one page without causing aneurysms in, by far, one of the shortest posts I’ve done in a while.

Abstracts are your friend

You can call them summaries, blurbs, excerpts or abstracts, but it all does the same thing. I’m visiting a site to see if it’s interesting and the only way to know for sure is I get a good summary of it in under 30 seconds. So go ahead and flood the front page if you must, but you need to summarize!

You’ll be amazed at how much content you can get away with publishing on one page with just excerpts, and we’re talking 10 articles or more along with a sidebar with links and even more content beneath.

Make the content look like it’s not a lot and you can still get the message across and entice visitors to stay longer.

Whitespace! Whitespace! Whitespace!

If you need to push a lot of “stuff” to chew on the front page, give your visitor something to drink to help it all go down. It’s nice to think your visitors can read content the same way a barcode scanner works at the super market, but this is the real world and we’re all slow and impatient humans.

Too much content in a small space makes it just that much harder to understand or follow. I’ve lost count how many times I’ve had to say this, but we don’t read online the way we read old media. Scanning get’s the gist through and if the content is interesting enough, they’ll stay and read more.

More content ≠more HTML and CSS

I’ve had to create entire frontends for clients and one familiar excuse for putting it off and keeping old, broken, templates that some project managers think the more content you have to display, the more HTML and CSS needs to be worked into the new layout.

I call BS, good sir! It was because I got this excuse again that I finally decided to write about it.

Unless you’re designing a rich UI application or something with WebParts (blegh!) or publishing pages and pages of code (*cough*), there’s no reason more content should disproportionately add to the download size and complexity of the theme. More content should be just more content. If formatted properly, there’s no reason it would mess up the rest of what’s on the page.

Case in point, I just hacked in more content to my Simply theme with small changes to the CSS and minimal changes to the HTML scaffolding. You can see what it looked like before adding more content on its original post.

That change took less than 5 minutes and it shows everything I’ve written here so far. That’s 10 articles with the 2 most recent featured with 1 welcome banner, 1 sidebar, 2 link lists using said sidebar and one of 3 extra columns on the bottom, along with an about page and tag cloud. That’s a lot of content (granted without JavaScript) in HTML all under 10K in download size less images and with plenty of room to add more.

*And now, since it’s 1AM right now and I just finished my futile explanation via email to my boss on why the layout we’re using is rubbish (since they chose to ignore all of the above) and completed this post… I’m going to bed!

Site of the Week: CSS-Tricks

If you ever needed an index of all those fancy web sites to draw inspiration from, then this is the place to go. This particular section is nothing less than an index of design gallery sites which will expose you to a brunt of design goodness from which you may never recover.

The Great Web Design Gallery Roundup

The Great Web Design Gallery Roundup

Recycle your layouts!

Be green (with CSS) and save your sanity. There are so many combinations that can be achieved with one simple iteration that it doesn’t make any sense to start again from scratch just because it’s a new project.

I don’t see why so much time is being spent on rewriting a layout, when some tweaking in the stylesheets will get near-instant results. Of course, this will only work if your HTML isn’t cluttered with redundant markup or any quick hacks.

Let’s take a barebones example that can be applied for a lot of situations: I need a layout with a navigation bar, a search form, a login form and a sidebar.

The first example fits the bill for a simple, but functional layout.
Nothing fancy here. Just the basics to get the content styled, breadcrumbs and the above mentioned requirements. You might remember the Ouroboros logo from my earlier tutorial.

Using the same layout as a base, we can expand it a bit more using different styles and images. Some of you will recognize the SharePoint colors. But that’s just a start for the inspiration. You can use whatever else you have in mind. We will use the same CSS dropdown menu, but modify it to use icons in the links.

Take a look at the source for the second example. You will see the HTML is almost the same. The only content changes are simply the search form, which was moved up a bit and images in the navigation dropdown menu. The images were courtesy of the Tango Desktop Project.

Functionally, the two are identical. The only major changes were done with CSS. This is a good way to quickly make changes in a rush or apply changes with the majority of modifications taking place in the stylesheet. ASP.NET designers will find it handy since the easiest way to switch themes is to use the App_Themes folder and .skin files.

Just because you are limited to single theme elements by default in ASP.NET doesn’t mean you have to have limited style capability. In fact, there’s a trick you can use in ASP.NET that will make it easy to apply seperate styles for “screen”, “print” and “handheld” etc…

Simply create your StyleSheet.css file in the App_Themes folder under your custom theme.

Edit it by applying generic styles that will apply to all display forms on top.

E.G.

/* Common */
body
{
	font-family: Sans-Serif,Tahoma,verdana;
	font-weight: normal;
	font-size: medium;
	color: #000;
	background: #fff;
}

Then append the “screen” styles that will be for ordinary monitors

/* Screen */
@media screen
{
	 /*Stuff*/
}

Followed by “print” styles if you have any… And repeat this pattern for whatever other platforms you plan to support.

In the end, you should have something similar to this :

/* Common */
body
{
	font-family: Sans-Serif,Tahoma,verdana;
	font-weight: normal;
	font-size: medium;
	color: #000;
	background: #fff;
}
/* Screen */
@media screen
{
	/* Reset */
	body, div, p, h1, h2, h3, h4, h5, h6, form, fieldset,
	input, ul, li, table, td, th
	{
		margin: 0;
		padding: 0;
		border: 0;
	}

	body
	{
		font: normal 75% sans-serif,tahoma,verdana;
		color: #1d1d1d;
		text-align: center;
	}
	div.page
	{
		margin: 20px auto;
		text-align: left;
		width: 90%;
	}
	div.sidebar
	{
		float: right;
		width: 20%;
	}
	div.main
	{
		float: left;
		width: 80%;
	}
	h1, h2, h3, h4, h5, h6, p
	{
		padding: 5px 10px;
	}
	h1, h2, h3, h4, h5
	{
		font-weight: normal;
	}
	h1
	{
		display: block;
		font-size: 200%;
		padding: 5px 10px 0 10px;
	}
	h2
	{
		font-size: 180%;
		padding: 0 10px 0 9px;
	}
	h3
	{
		font-size: 150%;
		padding: 10px 10px 0 10px;
	}
	h4
	{
		font-size: 140%;
		padding: 0 10px 0 10px;
		line-height: 90%;
	}
	h5
	{
		font-size: 130%;
		padding:10px 10px 0 10px;
	}
}

/* Printer Styles*/
@media print
{
	body
	{
		font: normal 75% sans-serif,tahoma,verdana;
		color: #1d1d1d;
	}

	/* No need to print the sidebar and nested nav */
	div.nav, div.nav ul li ul, div.sidebar, p.skip
	{
		display: none;
	}
}
/* Portable device */
@media handheld
{
	/* Don't show sidebar  and nested nav, but show skip */
	div.nav, div.nav ul li ul, div.sidebar
	{
		display: none;
	}
}

 
In case you’re wondering, I used Visual Studio to nicely format that stylesheet. I know I’m lazy ;)
The layouts and stylesheets in the examples were done in notepad, so they don’t have the same nice formatting. I did it all as a quick sketch up. But I think you get the point.

Update

Made a few modifications and added a sidebar menu

Update 06/27/08

I added an index for the layouts and another new theme.