• Home
  • Create
    • Cookbook
      • Recipes
    • Crafts
    • Grateful Hearts Giving Hands
    • Holidays
      • Christmas
      • Easter
      • Independence Day
      • Thanksgiving
      • Valentine’s Day
    • Ingenious Ideas
    • Printables
    • Sewing
  • Family Life
    • Farming
    • Genealogy
  • Homeschool
    • Art
    • History
    • Homeschool Encouragement
    • Language Arts
    • Learning Styles
    • Library
    • Math
    • Science
    • Unit Studies
  • Motherhood
    • Home Making
      • Establish a House
    • Me
  • My Faith
    • Celebrate the Family Proclamation
      • Family Proclamation Articles
    • Family Home Evening Lessons
    • Flannel Board Stories
    • General Conference
    • Memorize the Family Proclamation
    • The Living Christ: An Easter Countdown
      • Living Christ Lessons
    • Young Women
  • Contact
  • About Me

Cranial Hiccups

Every once in a while and totally unintentionally my brain spews out a good idea.

You are here: Home / Customizing Your Blog – Part 5 Adjusting Columns and Margins

Customizing Your Blog – Part 5 Adjusting Columns and Margins

May 7, 2008 by Montserrat {Cranial Hiccups} 11 Comments

Before reading this post I recommend reading the previous posts in this series:
Customizing Your Blog – Part 1 Gathering Patterns and Colors
Customizing Your Blog – Part 2 HTML Code
Customizing Your Blog – Part 3 Fonts
Customizing Your Blog – Part 4 Creating a New Header

*************************************************

I’ve written and rewritten this post countless times. It’s not that adjusting the columns (main post and sidebar) of your blog are hard but instructions on how to do it is challenging because each blog template is completely different. So here goes. . .

THE BASICS

As always, try these changes on your “practice” blog first until you figure out what you want and how to do it.

To change the width of your posts and sidebar columns first open the Edit HTML under the Layout section of your blog’s dashboard. Scroll down the template until you get to something similar to this: (some templates like Rounders say Page Structure instead of the first Outer-Wrapper and say Main-Wrap instead of Main-wrapper)

/* Outer-Wrapper
———————————————– */
#outer-wrapper {
width: 660px;
margin:0 auto;
padding:10px;
text-align:$startSide;
font: $bodyfont;
}

#main-wrapper {
width: 410px;
float: $startSide;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}

#sidebar-wrapper {
width: 220px;
float: $endSide;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}

See where it says width under each section? That’s the width in pixels of your columns. The outer-wrapper is the width of your blog. The main-wrapper is the post column and the side wrapper is the sidebar. Some blog template don’t have pixels as their width. Instead there’s no width under the outer-wrapper and the width in the main-wrapper and side-wrapper are percents like

width: 68%;

These can be changed to pixels but first you have to add a pixel width under the outer-wrapper section in your blog template. Just use the one above as an example of what to type.

On average the width of a blog is 750 pixels. You can increase that but if you get too big your readers will end up having to scroll sideways to see everything and that gets rather annoying. To avoid that don’t get any wider than 980 pixels (px).

The main-wrapper and side-wrapper widths should add up to less than the width of the outer-wrapper. If they add up to more than the sidebar gets bumped to the bottom of the page after all the posts. If they add up exactly to the width of the outer-wrapper then there’s no padding around the words and they all blend in together making for one crazy looking mess.

FUN STUFF (MORE ADVANCED)

Changing Sidebars from Right to Left
Changing your side-bar from the left side of your blog to the right side or vice versa is as simple as typing in left or right. Erase the blue below and type in right (or left) making sure you don’t type right (or left) for both the main-wrapper and side-wrapper.

#main-wrapper {
width: 410px;
float: $startSide;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}

#sidebar-wrapper {
width: 220px;
float: $endSide;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}

Moving the alignment of the columns
Some blogs have the text of their main post starting right at the edge of their blog. Others have a “buffer” and their posts start say an inch or two from the side of their blog. This is what is called the margin. If your template doesn’t have margin listed under the main or side wrappers you can add it in. It should look like this:

margin: 100px;

The number of pixels isn’t the only variable that you can change. The example above is telling the computer you want a margin of 100px all around the entire column. If you just want the margin or “buffer” to be on a particular side you have to tell the computer that. For example,

margin-left
margin-right
margin-top
margin-bottom

Keep in mind that your blog is only so many pixels wide.The margin widths also need to be added to the sidebar and main post widths to make sure they come in at exactly the outer-wrapper width or less.

Background for Main Posts and Sidebars
I received a question on how to make the background for the main post and sidebar the same. The answer is actually simple and hard, or rather time consuming. The background image for the entire blog is used to create the look of the main post and sidebar sections. The ‘borders’ you see are the result of the background image.

I created the background image using my Photoshop Elements program. Any photo editing program will allow you to create a background. The hard part comes in guessing how far from the edge of your background to put your border for the main post and sidebar. Then use the instructions here for inserting the background you’ve created into your blog template.

After inserting your background you need to add the following red code under the body section of your template.

body {
background-position: center;
background-attachment: fixed;
margin:0;

The background position can be moved to either the left or right side if you wish. Having it centered though makes it easier to work with. The background attachment is fixed meaning the the blog background will not scroll when the main posts and sidebar do. It stays static on the screen.

You can then adjust the margins of your main posts and sidebar using the instructions above. You also have to delete the backgrounds for your main-wrapper (main posts) and side-wrapper (sidebar) so the blog background can be seen creating the illusion of one continuous border for both.

Any other questions? Please feel free to ask!

© 2007-2013 Chocolate on my Cranium, LLC all rights reserved

Share this:

  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on Pinterest (Opens in new window) Pinterest
  • More
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pocket (Opens in new window) Pocket

Related

Filed Under: Uncategorized Tagged With: Bloggy Junk, Cranial Hiccups

Comments

  1. Richelle says

    May 8, 2008 at 5:20 am

    Thanks! I’m going to have to try that.

    Reply
  2. Calandria says

    May 8, 2008 at 10:05 am

    Oh, good! I can’t wait to try this when I have a few minutes. Your tutorials are excellent.

    Reply
  3. Skye Lee says

    May 8, 2008 at 1:09 pm

    Is it just me? Why can’t I read anything on the left side of the page? It is covered by the dark brown. I am really interested in this post too 🙁

    Reply
  4. Princess of Everything (and then some) says

    May 8, 2008 at 1:27 pm

    You are my hero!! I just stumbled across your blog while trying to update my template. I followed your WONDERFUL instruction and BAM I have a snazzy new blog!

    Going to work on the header now!!

    I owe you big time!!

    Reply
  5. Cocoa says

    May 8, 2008 at 4:53 pm

    skye lee,

    I haven’t had any other complaints about it. Is your screen resolution set too low? Sometimes that will affect how everything, especially web pages and blogs, look on your screen.

    Reply
  6. Tamra says

    May 8, 2008 at 8:11 pm

    i find it a little difficult to read the post too at least the part that is over the dark brown ribbon. Anyway, i love your tutorials. I’ve used them to jazz up my and my mom’s blogs. I was wondering if you are going to show us how to keep the background still and just the posts and sidebars scroll? I love the way that looks. Thanks so much for these tutes. And congrats on winning that spectacular necklace from DesignMom.

    Reply
  7. Tamra says

    May 8, 2008 at 8:14 pm

    oops, just re-read the last one of your instructions. Thanks. =)

    Reply
  8. The Gooch Family says

    May 8, 2008 at 8:44 pm

    These are great, Cocoa. Are you going to teach us how to put those great buttons and widgets on our side bars now. I’d like to know how you got the one for the Church.

    Reply
  9. Ritsumei says

    June 6, 2008 at 12:59 pm

    These tutorials are lovely! I just fixed up my blog too. It’s fun to have a more customized look than what comes in the Blogger templates. Thanks so much for all the time that goes into this!

    Here’s my burning question: I’ve got an image that I’d like to add between my posts, like I’m guessing that you’ve done with your “Cocoa” at the end of your posts, but I’m where yours is a signature & works as a picture, I want a cute little bar thing that comes with my linkware webset that I’m using. Do you know how to do that? Does that question make sense??

    Reply
  10. Ritsumei says

    June 6, 2008 at 1:27 pm

    One more burning question: could you also show us how you did the buttons at the top? “home” “flannel board stories” ect. Thanks!

    Reply
  11. kelly rae says

    July 1, 2008 at 10:25 pm

    this is so helpful. may i ask if there is away to have 2 sidebars (one on the left and one on the right). would you be willing to perhaps do a trade? some art for helping me with my dear old blog?
    let me know!
    i’m at http://www.kellyraeroberts.com

    Reply

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Hello, I'm Montserrat. I'm a farmer's wife, mother of eleven, homeschooler, chocoholic, music lover, and like to play a good game of Scrabble. You can read more about me here. . .

You'll find a little bit of everything on this blog. It's my place to share all the ideas, activities, crafts, and resources that I have gathered and tried over a number of years. Feel free to browse around using the menu up top or doing a search in the box below.

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Archives

May 2008
S M T W T F S
 123
45678910
11121314151617
18192021222324
25262728293031
« Apr   Jun »

Return to top of page

COPYRIGHT © 2025 Montserrat Wadsworth at Cranial Hiccups • Lifestyle Pro Theme on Genesis Framework

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin