Typographic Details on the Web—Header Spacing4 Nov 2007
Found in: CSS, Web Design
Posted at: 5:05 PM
...the reader shouldn’t have to think about it at all. It should be made subconsciously clear.
Taking a cue from Khoi Vinh and Mark Boulton, I try to pay extra attention to the details of typography in my websites. As anyone who’s ever designed a website can attest, this is somewhat unrewarding. Not only are we limited to the Big Eight typefaces (this alone shouldn’t be enough to ruin web typography—remember, constraints are your friends), but we are also at the mercy of the end users and, in many cases, the people we hand off the site maintenance to. We are forced to design for unknown content at unknown sizes. While we can’t prepare for all possible outcomes, paying particular attention to the details will help your design maintain cohesiveness and can enhance the meaning of the content, regardless of what it is.
One thing that I’ve been noticing that seems to fall by the wayside on many otherwise well-designed sites is spacing before and after headers. You can see 2 examples of what I’m referring to here:
See how the header floats in its own space, with no relationship to either the previous or subsequent paragraphs? It’s acting as a free agent, when it should clearly be related to the following paragraph—the space after the heading should be less than the space before it. This helps to establish a strong typographic hierarchy, and lets the reader know where they are and what they’re reading. Since English is read in a top-down direction, it’s not hard to figure out the the header text is referring to what comes next, but the reader shouldn’t have to think about it at all. It should be made subconsciously clear. Having a header float in space like that can also possibly make the reader unnecessarily pause on it.
I think the reason this particular detail gets overlooked so often has to do with the fact that vertical margins are not hierarchical or cumulative. The larger value will always overwrite the smaller. For instance, if I have specified {margin:20px 0 5px} on an h2, but then give p‘s a {margin:20px 0;}, the space between a paragraph and it’s preceding header will be 20 pixels, exactly the same as the space above the header, and you end up with a floater. What I usually do is set the space between paragraphs with a bottom margin only, so the header’s bottom margin won’t be overwritten.
Another reason sites end up with floating headers is semantic (misusing tags), which happens to be the case in both examples above. On those sites, the header is created with p tags and strong and (more unfortunately) deprecated b tags, when an h4 or h5 would have been more meaningful. Many times, this is forced by the Content Management System being used, so the workaround is more difficult or in some cases impossible. Although, if you are forced to use p‘s and strong‘s for subheads, then you could turn the normally inline strong to a block element (since vertical margins are ignored on inline elements) and apply the margins like so: {margin:20px 0 10px; display:block;}. You’re stuck with the 10 pixel bottom margin you applied to all p elements, but at least the margins won’t be identical.
While designing for the unknown can be extremely frustrating, it can be equally rewarding when we solve problems. And it all leads to a more successful website design, which leads to happy clients.
Comments
Document Management Software | 11 Sep 2008 | 12:51 AM
Great review!!!
Really important information.
Document Management System is a computing system used to track and store electronic documents and/or images of paper documents. Document Management Software helps people to improve the processing of information.
Best Regards
Document Management Software
apartments in edinburgh | 13 Sep 2008 | 5:12 AM
Nice informative article. Thanks for sharing. Really it helps if you an use it properly. Keep in touch
Restaurant website design | 3 Oct 2008 | 10:15 AM
What an amazing post! I would like to thank you for sharing your thoughts. You are putting very good effort into the stuff you post. Keep up the good work
Cheers,
Bed and Breakfast Website Design
ray ban 3322 | 13 Oct 2008 | 2:48 PM
Very impressed with this program. Thanks for sharing and let us know more about new releases.
Get FREE Backlinks | 14 Oct 2008 | 7:10 AM
Fine knowledge based post. thanks for sharing. I enjoy it.
Hope your design solve the problem.
ecommerce website development | 26 Oct 2008 | 12:58 AM
thanks for the tips that you give i hope that there would be more in the future.
houston apartments | 28 Oct 2008 | 1:40 PM
thanks for the help, some of this stuff i never would have even noticed
tomball apartments | 28 Oct 2008 | 2:06 PM
making me read this makes me realize how bad my website was really constructed.
thanks for all the tips
Motorcycle Fairings | 3 Nov 2008 | 1:54 PM
Very informative comments. Will definitely reccomend this blog.
Andrew J. Hamilton | 3 Nov 2008 | 2:45 PM
websites for sale
Outsource Helpdesk | 27 Nov 2008 | 6:08 AM
I admire the valuable information you offer in your articles. I will bookmark your blog and have my children check up here often. I am quite sure they will learn lots of new stuff here than anybody else! Outsource Help Desk
Fun gifts | 28 Nov 2008 | 3:26 AM
I’m really impressed with your article, that was exactly what I was looking for. I will be visiting you very often in the future for more! Birthday gift ideas
free payday loan | 28 Nov 2008 | 5:21 AM
Since English is read in a top-down direction, it’s not hard to figure out the the header text is referring to what comes next, but the reader shouldn’t have to think about it at all. free payday loans
Life Vests | 30 Nov 2008 | 4:09 AM
What I usually do is set the space between paragraphs with a bottom margin only, so the header’s bottom margin won’t be overwritten.
promotional products | 1 Dec 2008 | 1:54 AM
Having a header float in space like that can also possibly make the reader unnecessarily pause on it. promotional pens
Fonterutoli | 1 Dec 2008 | 2:49 AM
Seems like some cool findings you are having! I must admit that I love your style . God bless you. Siena
Add your comments