Tweaking the CSS Code

>> Browse templatesMoney tips19 comments

(This is a sub-post for Step 5 from Tutorial 11: Starting Your Own Blogger Template)

This is the crucial part of designing - setting how your blog looks like. By this time the widths of all the containers inside the CSS code should have been set. What you need to know about tweaking the CSS code is that it's a recursive process - it's a process of refining that always repeats back and forth until you're 'happy' with the end result.

There are so many things to tweak and so many containers to customize. So how do you do this and where do you start? The easiest approach is to start from the top. Assuming that you're starting from an existing template, at this point you don't have to worry much about customizing the body, outer-wrapper, and content-wrapper, except the width. You can tweak these containers later (or let the existing code as default, unless you want to tweak them later). If you want to use an image as a background image of the whole template, you can also do this later.

Read Tutorial 3: The Structure of CSS Styling Section first if you're not familiar with the basics of the CSS Styling part of the code. Also remember that you should not expect your design to be perfect the first time you do it. It's a process that takes time. To know the basics of tweaking the CSS code, read Tutorial 4: Setting the Properties of a Container. And, if you don't know what containers to customize, read Tutorial 5: Common Containers and Elements in a Blogger Template.


I'd suggest you start with the Header section. What you commonly need to do here is to set the background color, set how the Blog Title and Blog Description looks like - the font, colors, font-size, etc. If you want to set a large background image as the header image, set it using the Edit Header button in the Page Elements page. The list below is from Tutorial 5.

  • #header-wrapper - the container that wraps your Blog Title and Blog Description.
  • #header - the container just inside the header-wrapper.
  • #header h1 - the command inside this containers controls the appearance and layout of your Blog Title.
  • #header h1 a - controls the properties of the Blog Title as a link text.
  • #header .description - the properties of your Blog Description.
  • #header a img - controls the properties of an image inside your header container.

Main and Post:

The next container to tweak is the Main and Post containers (including the Post-Footer). This one will take most of your time because there's a lot of subcontainers inside it. Infact, Post is a subcontainer of Main. It's usually easiest if you tweak the subcontainers following a certain order. My suggestion is to follow the order below. The list below is from Tutorial 5.

  • #main-wrapper - the container that wraps your Date Header, Blog Posts, Comments, Feed Link, and any widgets that you drag above or below the Blog Posts.
  • #main - the container just inside the main-wrapper.
  • #main .widget - controls the properties of all widgets inside the main container.
  • - sets the properties of your Date Header (just above your Post Title).
  • .post - sets the properties of your Blog Posts container.
  • .post h3 - sets the properties of your Post Title.
  • .post-body p - sets the properties of the body or content of your post.
  • .post ul - sets the properties of an unordered list (a list that is not numbered).
  • .post ol - controls the properties of an ordered list (a numbered list).
  • .post li - controls the properties of the individual list inside an unordered list or an ordered list.
  • a img - controls the general properties of an image (the a refers to a link; and an image is by itself a link).
  • blockquote - sets the quoted text in your posts.
  • code - sets the text contained within the code tags in your posts.
  • .post-footer - sets the overall properties of the post-footer container.
  • .post-footer-line - sets the properties for each new lines in the post-footer.
  • .post-footer a - sets the link text properties inside the post-footer.
  • .post-footer .post-comment-link a - sets the "comment" link inside the post-footer.
  • #blog-pager - controls the properties of the "newer posts", "home", and "older posts" links.
  • #blog-pager-newer-link - controls the properties of the "newer posts" link.
  • #blog-pager-older-link - controls the properties of the "older posts" link.
  • .feed-links - controls the "Subscribe to: Posts (Atom)" link.


Once you're done with the above, customize the sidebar. If you have more than 1 sidebar, you may want to customize each sidebar differently. You'll also need to customize the Profile container and the Blog Archive if you want them to be different from other sidebar widgets. The list of container elements from Tutorial 5 are:
  • .sidebar-wrapper - the container that wraps all elements and contents in a sidebar.
  • .sidebar - the container just inside the sidebar-wrapper.
  • #sidebar1 - sets the properties inside sidebar1.
  • #sidebar2 - sets the properties inside sidebar2. If you want the properties inside sidebar1 and sidebar2 to be the same, than you can just the properties inside .sidebar and don't have to even write down the #sidebar1 and #sidebar2 in your CSS code.
  • .sidebar .widget - controls the properties of all the widgets (the Added Page Element) in your sidebar.
  • #sidebar1 .widget - only sets the widgets in sidebar1.
  • .sidebar .BlogArchive - sets the Blog Archive properties. Technically, this is a sidebar widget too, but I'm not sure why setting the properties for sidebar widgets doesn't change any properties for the Blog Archive. That's why I have to write down the .BlogArchive command to set its properties.
  • .sidebar h2 - sets the title/header properties of a sidebar widget.
  • .sidebar #BlogArchive1 h2 -sets the properties of the Blog Archive's title.
  • #Profile1 - sets the properties for the About Me block.
  • #Profile1 h2 - sets the title/header for the About Me block.
  • .profile-img a img - sets the image in the About Me block.
  • .profile-textblock - sets the author description About Me block.
  • .profile-data - sets the author's data in the About Me block.
  • .profile-datablock - sets the overall blocks of data in the About Me block.


After the sidebars are done, customize the Comments container next. Post a few test comments to see how they will appear after tweaking. The list of container elements from Tutorial 5 are:
  • #comments - sets the overall comment container's properties.
  • #comments a - sets the link text properties inside a comment container.
  • #comments h4 - sets the header of the comment container.
  • .deleted-comment - sets the properties of the deleted comment.
  • .comment-author - sets the properties of the comment author.
  • .comment-body p - sets the comment body properties.
  • #comments ul - controls the unordered list inside a comment container.
  • #comments li - controls the individual list inside a comment container.


The last container to be customized is the Footer. The list of container elements from Tutorial 5 are:
  • #footer-wrapper - the container that wraps all elements and contents inside a footer section.
  • #footer - the container just inside the footer-wrapper.
  • #footer h2 - sets the properties of the footer title/header.
  • #footer .widget - controls the footer widget properties.
  • .footer a - controls any footer link texts.

Refining Touch:

Now that you're done customizing all the containers, what you need to do is go back and take a look at your blog as a whole and do some minor tweakings. What I suggest here is you might want to change some font or background colors, font size, margins and paddings, adding borders or changing the borders colors, and so on. But when adding borders, be careful that it might change the width of the container that you're adding the borders on. If there are problems (say that the Sidebar is pushed below the Blog Post), you'll need to increase the width of the parent container that it's in.

The best way to change background and font colors is to have them as variables so that you can use the Fonts and Colors tab in the Layout page. If you're not sure how to do this, just use my Generic Blogger Template as you're starting template. It has plenty of color and font variables to start with.


Anonymous October 26, 2007 8:39 am  

Great tips! I m Using One of your Template in my Blog Here

How can I resize my post body? Can You tell Me Plz..

Ingrid January 24, 2008 3:52 pm  

Thanx very much for the tutorials, makes changing the template much easier now I know what to look for and where to find it :)

George April 26, 2015 10:59 pm  

Some people have been deprived of education because of poverty. It has become a privilege and not a right. The overnment should take a look at this issue and make sure every child gets the best education. high-quality essays writing here for students help in exams.

Style)r November 14, 2015 1:49 pm  
This comment has been removed by the author.
Mary Green March 16, 2016 3:50 am  

You should refer to the professional resume reviews center before ordering your resume from the services you actually don't know and how they work. To be sure that you won't be cheated just check the reviews based on real customers' experience.

Paulo October 23, 2016 3:22 am  

These organizations can settle your monetary matters through an altered APR, which means a loan fee that can't change, paying little heed to the bank's circumstance. A non-altered APR implies that the financing cost on the credit from the bank or sometimes, the dealership itself, would vary toward the end of a year. Cash Advance Chicago

姚嘉 November 30, 2016 12:17 am  

cheap nike shoes
armani exchange outlet
nike huarache
nike blazer
longchamp bags
michael kors handbags
new orleans saints jerseys
washington redskins jerseys
chicago bears jerseys
49ers jersey

dada24 Xu December 24, 2016 4:03 am  

dolce and gabbana outlet online
ugg boots sale
canada goose jackets
canada goose
michael kors handbags clearance
longchamp bags
burberry outlet
canada goose outlet
celine handbags
michael kors outlet canada

ninest123 December 13, 2017 10:16 pm  

north face outlet
hermes outlet
ugg outlet
michael kors
canada goose jackets
michael kors outlet store
coach factorty outlet online
michael kors outlet online
canada goose jackets uk

raybanoutlet001 January 19, 2018 5:57 pm  

michael kors handbags
coach outlet online
coach factory outlet
indianapolis colts jerseys
prada shoes
coach outlet store online
ray ban sunglasses outlet
cheap nfl jerseys
golden state warriors
mbt shoes

Fghkfhk Dfgaert April 08, 2018 8:47 pm  

hermes belts
pandora outlet
true religion jeans
coach outlet
oakley sunglasses
coach outlet
cheap ray bans
cheap oakley sunglasses
miami heat
raiders jerseys

jjjjjjjjjjjjj April 26, 2018 7:10 pm  

lacoste outlet
100% real jordans for cheap
golden goose sneakers
yeezy boost
nike huarache
golden goose outlet
links of london outlet store
nike polo
nike air max 90
nike dunk shoes

candy lol May 11, 2018 1:29 pm  

You have a real ability for writing unique content. I like how you think and the way you represent your views in this article. I agree with your way of thinking. Thank you for sharing. Skinscraft

haiyan wu May 29, 2018 6:37 pm  

jordan 11
adidas superstar
ysl handbags
adidas ultra boost
kobe byrant shoes
huarache shoes
nike air force
kobe basketball shoes
yeezy shoes

Fay Arch July 11, 2018 11:23 pm  

Download now free games

haiyan wu July 24, 2018 7:39 pm  

ferragamo belt
lebron soldier 10
westbrook shoes
nike roshe one
red bottom shoes for women
yeezy boost 350
curry 4
cheap ray bans

Unknown November 01, 2018 11:27 pm  

Free download the best Driverpack Guide

Yaro Gabriel November 08, 2018 11:33 pm  

kate spade outlet
canadian goose
nike tn
moncler outlet
ugg outlet
hugo boss
ugg boots
moncler outlet
jordan 4
moncler jackets

Solusi Sehat dengan Herbal November 11, 2018 4:23 pm  

Very interesting article, thank you for sharing. I also want to share the following health articles, God willing, useful. Thank you :)

Obat Usus Buntu Tanpa Operasi
Cara Menghilangkan Kelenjar Tiroid
Cara Mengatasi Sembelit atau Konstipasi
Obat Iritasi Mata Karena Softlens
Obat Kelenjar Getah Bening Menahun