Hello there. I am Terry and I am a full-time undergraduate based in Singapore. I take photos, write a blog and design websites.

And no, I'm not a teddy bear.

Design Stuff

Hendra asked me in a tag about how to design a blog footer like mine, so I thought I should be sharing a little about my footer layout. Here’s the rough layout of my blog footer, with the names of the classes of the <div> tags. I’m sorry to my visitors who are colour blind, because the div containers are colour coded…

Note: the following article contains CSS terms which you might not understand. Don’t try too hard to understand it if you can’t – you can always ask me in the comment section :razz: If you get lost along the way, refer back to this layout guide below:

Teddyrisation Gamma - Footer Design

The main <div> classes for the whole footer layout are footer-cap-top (red), footer (orange) and footer-cap-btm (red). The reason why I didn’t actually merged them into one whole container is because the current version of CSS (which is CSS 2) does not support more than one background image per element. And since I wanted to make the footer expandable alongside with its content (ie, the footer’s height is not restricted, it stretches as far as the content goes) and wanted to add rounded caps to both its top and bottom, I can only cut it into 3 pieces.

Here’s the overall HTML code for the footer (heavily simplified):

  1. <div class="footer-cap-top">Tagcloud header is placed here visually.</div>
  2. <div class="footer">
  3. <div class="footer-left">
  4. <div class="footer-top">Houses the Wordpress tag cloud</div>
  5. <div class="footer-left-left">Houses the list of recent posts.</div>
  6. <div class="footer-left-right">Houses the list of recent comments.</div>
  7. </div>
  8. <div class="footer-right">Houses the About section.</div>
  9. </div>
  10. <div class="footer-cap-btm">Links to XHTML and CSS validator.</div>

Acknowledgement: The CSS styling for the display of the code above is created by Veerle.

Now the tricky part – visually I wanted to split the footer section into 3 columns, but this is impossible with the current CSS standards because for the float element only has two attributes, namely float: left and float:right. There’s nothing called center :S so what I did was to further separate the footer container into footer-left and footer-right (both are yellow).

The footer-right container is simple, I just had my contents housed inside paragraph tags and that’s all. It’s footer-left that is the one more on the crazy side. There are another three containers housed inside the yellow footer-left container – footer-top (green), footer-left-left and footer-left-right (both blue).

I think my styling is imperfect! I hope there’s a simpler way to hold my entire footer content together, because sometimes when I want to review the code it’s pretty tedious also! I also noticed that I should have named footer-top as footer-left-top, but I was too lazy to edit it when I was styling the footer, as it was about 2am in the morning and but hands are itching to upload this theme.

When Ivy made her new Springly wordpress theme, she talked about using tables instead of floated div containers to house her contents. I agree with her views, because in terms of cross-browser compatibility, tables are more suitable. Internet Explorer is well-known for its cranky CSS and HTML interpretation.

If you have any questions or CSS tips to share, feel free to drop a comment!

Burn after reading » Now you're done reading. What's next?

Related

Here are some posts that might interest you:

Popular

Posts that are popular among visitors:

Share it

If you've enjoyed the post, or think that it might be useful to others, do share in on a social network site that you're using. Thank you!

  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • LinkedIn
  • Reddit
  • Design Float
  • Identi.ca
  • Live
  • Ping.fm
  • Print this article!
  • Twitter
  • Netvibes
  • HackerNews
  • Slashdot

15 responses to “Design Stuff” » Leave a response

  1. momoResponse

    wow, it’s one hella complicated footer :P
    thx for sharing,
    i was really curious too..:)

    Check out momo’s last blog post: Momo & Five Vices Meme

  2. ^deeResponse

    Thanks for visiting my blog! Hehe.

    If you could provide a little “explanation” as to what the techie terms mean somewhere once – that would be great for reference. :D

    Check out ^dee’s last blog post: I voted!

  3. IvyResponse

    Whoa.. complicated footer indeed! Technically, when a div is going to only appear once in a page it’s best to use div id instead of div class. But it shouldn’t be a problem to use div class instead of div id. The problem starts when one uses div id instead of div class. It won’t validate.

    There is one drawback to using tables though. Blind people cannot access it because it’s read by their browser as one block of image, rather than text. So I only use tables if I have no other options for less pertinent information (for the damn IE). That means I will never put my entries into tables.

    Then again you gotta look at the demographics of your site. How many blind people actually visit your site? A tiny blog most likely won’t attract many blind people. At most 5. On the other hand, big sites like Dell, Microsoft, Apple, Google and CNN should make their sites more accessible to blind people. Unfortunately, they don’t.

    Check out Ivy’s last blog post: Five Vices: An Internet Meme

  4. IvyResponse

    Oh actually, my footer worked by splitting into 3. I had a float left, float right and then a center section which I float left as well. This is the actual CSS code. Since my footer headings like “tags” “categories” are actually part of the background, I had to really tweaks the alignment of the footer content to align with the background hence the margin-changes. If not, I don’t think they’ll be needed.


    .table-left {
    float:left;
    width:200px;
    margin-right:30px;}

    .table-center {
    float:left;
    width:315px;}

    .table-right {
    float:right;
    width:170px;}

    Check out Ivy’s last blog post: Five Vices: An Internet Meme

    1. teddYResponse

      Thanks for the two long comments :) haha! I never knew tables are not blind-friendly! So far I’ve rarely used tables in Wordpress because the WYSIWYG editor doesn’t support insertion of tables (but I’ve installed extended tinymce plugin to expand its function)… I never really dared touch tables. The only table element in my blog is perhaps the WP-calendar, heh :D

      Oh and the 3-column floating hack I’ve thought of it before! I wanted to float the first 2 columns to the left and the other to the right, but I’m afraid of the complications (eg having divs floated all around the place). Haha!

    2. IvyResponse

      Ooh you use the WYSWYG editor, eh? I’m retro so I use the plain editor and hand-code everything. I use Dreamweaver to create the theme but I don’t use any of the features – I always end up just hand-coding. LOL. I don’t know why; it’s just easier on me.

      Since I started in designing (more like messing with HTML) in 1996, tables are a lot more familiar to me than divs. Back then there was no CSS. So, layouts like ours will have to be fully coded in tables. It’s actually a lot easier than divs and is definitely going to be cross-browser functional. Too bad blind people can’t see it, so most designers phase tables out.

      To control the floating tables, I use a wrapper to position it. The code is like this:

      Left Column
      Center Column
      Right Column

      Check out Ivy’s last blog post: One Thousand Blood Sweat Words

    3. IvyResponse

      Dammit the code didn’t show! I meant to say this:

      [div id=footer-table]
      [div class=table-left]
      [div class=table-center]
      [div class=table-right]
      [/div]

      Check out Ivy’s last blog post: One Thousand Blood Sweat Words

    4. IvyResponse

      Dammit the code didn’t show! I meant to say this:

      [div id=footer-table]
      [div class=table-left][/div]
      [div class=table-center][/div]
      [div class=table-right][/div]
      [/div]

      Check out Ivy’s last blog post: One Thousand Blood Sweat Words

    5. teddYResponse

      Sorry about the confusion about WYSIWYG thing. I was talking about not using tables in my posts because Wordpress’ WYSIWYG editor does not support tables insertion, but an extended tinymce plugin will help. Well back to the blog template designing part, I also stick to the old hand-coded, trial-and-error way :) I just like it. I don’t usually use Dreamweaver, unless when it comes to imagemaps or the usage of sliced images because they involve way more complicated stuff (especially imagemaps, they’re pixel-precise)…

      Same here. I actually try to wrap everything up before using floats because floated containers are notorious trouble-makers :) heheh. Anyway thanks for leaving so many comments, I really appreciate them!

  5. IdResponse

    What a footer! Haha! I went through it and didn’t understand like half of it, but I think that’s because my eyes are aching right now. I’m thinking of implementing additional functions in my footer, so I’ll definitely keep this post in mind!

    Check out Id’s last blog post: Feels Like Tonight.

  6. Bush MackelResponse

    teddY – Your footer is freakin’ huge in terms of height and width! But it doesn’t really matter ’cause it looks so attractive and contains a lot of good information. I guess the trick though is making sure your users know there’s important information down there which is something I’m personally always leery about.

    Check out Bush Mackel’s last blog post: Fixing Up – Learn Stuff Online (Part 1)

    1. teddYResponse

      Yea it is definitely the hugest of all the Wordpress themes I’ve used so far. I guess it’s the size of the tag cloud that has increased the size. The previous theme’s footer is almost identical to the current one (minus the tag cloud) and it was way smaller, haha :) I was also worried that nobody bothered to read the footer, that’s why I’ve added a “Tag Cloud” link at the top of the page :D teehee.

  7. Garage Door HardwareResponse

    Garage Door Hardware…

    I always thought that was true until I talked to my brother. He has a different opinion….

Leave a Response » Share your thoughts or Return to top

Your name is required. Why?

  • So that I can address you personally (which I'm more than happy to do).
  • Everyone loves their name to be called, right? Nobody wants to be referred to as 'a certain someone' or Mr X (X-Men members aside).
  • If your post too much spam, your name will be imprinted on a personalised voodoo doll, completely free of charge. I'm just joking!

Your email is needed. Why?

  • Your email is, and will, never be given out to any third party under any conditions (except for people sneaking up behind me when I'm on WP admin).
  • So that I can contact you personally in case of certain issues that I wish to address personally.
  • If you post too much spam, I'll email the same spam you've posted 10 times back to you, completely free of charge.

You can always leave a personal URL behind

  • It can be anything - most people put their blog URL, their facebook page, their Twitter URL, their MySpace or etc.
  • I give love back by saying NO to no-follow. All of your webbie links are dofollows instead.

Twitter. Twitter. Twitter.

  • What is Twitter?: Twitter is a social networking and micro-blogging service that enables its users to send and read other users' updates known as tweets. Tweets are text-based posts of up to 140 bytes in length.
  • What is my Twitter ID?: To get a Twitter ID, you simply have to sign up for an account at Twitter.com. Your ID will be in the format of your profile's URL - http://twitter.com/[userid].

Comment notes

  • Gravatar: You can register for one at Gravatar.com
  • XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
  • Codes: Encode the HTML entities, and then wrap them up with <code></code> tags.
  • Note: Nobody is alike - so do their opinions. Do learn how to respect the opinions of others. Be nice. Offensive comments and spam will be removed. First time commentator's comment might be placed under moderation queue before publishing.
  • Just in case: If your comment is long and you've took hours *gasp* to type it, the worst thing can ever happen is to lose it due to a server time-out. A good habit will be copying your comment to the clipboard before submission.

Hello Easter Egg hunter! You've discovered the magic of the Konami Code!

Yea. You probably know what the Konami code is before getting to this page. So now what? Here is a randomised YouTube video on my favourites list... which includes Rickroll, if you're luck enough to get it.

You are currently watching Toddler throwing a funny tantrum. Loving it? You can even watch the video in its full screen glory :)

The Konami Code:
Konami Code sequence