More Explanation about the Body Code

>> Browse templatesMoney tips29 comments

Blogger Template Design: Tutorial 9

In this tutorial I'll explain a bit more about some special commands that you'll see in the Body section of the code. Here's the sample code again below:


<body>
<div id='outer-wrapper'><div id='wrap2'>

<!-- skip links for text browsers -->
<span id='skiplinks' style='display:none;'>
<a href='#main'>skip to main </a> |
<a href='#sidebar'>skip to sidebar</a>
</span>

<div id='header-wrapper'>
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true' title='Blog Title' type='Header'/>
</b:section>
</div>

<div id='content-wrapper'>

<div id='main-wrapper'>
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
</b:section>
</div>

<div class='sidebar-wrapper'>
<b:section class='sidebar' id='sidebar2' preferred='yes'>
</b:section>
</div>

<!-- spacer for skins that want sidebar and main to be the same height-->
<div class='clear'> </div>

</div> <!-- end content-wrapper -->

<div id='footer-wrapper'>
<b:section class='footer' id='footer'>
<b:widget id='Text1' locked='false' title='Blogger Template | JournalBlue' type='Text'/>
</b:section>
</div>

</div></div> <!-- end outer-wrapper -->

</body>



By default, each container has to be wrapped with the div tag and a b:section tag. Each div and b:section is 'named' with an identifier using the id command. The can be further classified into a 'class' using the class command. This identification and classification are useful as a reference when you want to style it later using CSS. In the CSS code, the id command is referred to using the # symbol and the class command is referred to using the . symbol. For example, in the CSS code, you might see #main-wrapper {...} or .sidebar {...} which are the codes to style the main-wrapper and sidebar. You can read further about these identification and classification in w3schools.com

Everything wrapped inside the b:section are the widgets (also called the Page Element). For example, inside the Header is a widget named Header1. Note that this widget contains the code maxwidgets='1' showaddelement='no'. The maxwidgets='1' means that the maximum widget the header-wrapper can have is 1 only. That means you can't drag a Page Element and place it below or above the Header. The showaddelement='no' means that the Add a Page Element button will not appear in the Header section.

In the main-wrapper, you only have the showaddelement='no' code which means that you won't have the Add a Page Element button there, but you can still drag other widgets and place it above or below the Blog Posts inside the main-wrapper.

In the sidebar-wrapper, you have the preferred='yes' code. This command will create the Add a Page Element button for you to add widgets. Plus, you won't have any limitations on how many widgets you want to add. As you already know, you can always drag the widget to any other wrapper as long as they don't limit the amount of widgets to be displayed in that wrapper.

In the footer-wrapper, there's no code following the id command. This means that you won't have the Add a Page Element button but you can drag any widgets into the Footer section.


***************************************
Next Tutorial:
The next tutorial will show you how to add more sidebars, e.g. to make a 3-column template, or change their locations.

Read more...

The Body Section of the Blogger Template Code

>> Browse templatesMoney tips33 comments

Blogger Template Design: Tutorial 8

In this tutorial, I'll explain the basic structure of the Body of the code so that you get the idea on how it works with the rest of your code. The code is located in Section 3 of the Blogger Template Code Structure. This is the main part of the Blogger template code that retrieves the data to be displayed on your blog. It's basically the core part that makes your whole blog functions. The code that sets how it appears on your blog is the CSS Styling code.

Refering back to the tutorial Blogger Template Code Structure, the Body code is in Section 3 as shown in the image below.


Shown below is the Body code copied exactly from the Blogger Edit HTML page with the 'Expand Widget Button' unchecked. I do not want to include the complete code by checking the 'Expand Widget Button' for 2 reasons. First, it's not necessary to do this. You actually don't even have to know what goes on inside the complete code to be able to design a properly working Blogger template. That's all been done 'automatically' by Blogger, which is the beauty of using this new Blogger template as oppose to the old classic ones. Second, by looking at this simpler version of the code, you'll be able to grasp easier the main idea of how all the containers in the template are laid out.


<body>
<div id='outer-wrapper'><div id='wrap2'>

<!-- skip links for text browsers -->
<span id='skiplinks' style='display:none;'>
<a href='#main'>skip to main </a> |
<a href='#sidebar'>skip to sidebar</a>
</span>

<div id='header-wrapper'>
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true' title='Testpage Two (Header)' type='Header'/>
</b:section>
</div>

<div id='content-wrapper'>

<div id='main-wrapper'>
<b:section class='main' id='main' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
</b:section>
</div>

<div id='sidebar-wrapper'>
<b:section class='sidebar' id='sidebar' preferred='yes'>
<b:widget id='Profile1' locked='false' title='About Me' type='Profile'/>
<b:widget id='BlogArchive1' locked='false' title='Blog Archive' type='BlogArchive'/>
<b:widget id='Label1' locked='false' title='Labels' type='Label'/>
</b:section>
</div>

<!-- spacer for skins that want sidebar and main to be the same height-->
<div class='clear'>&#160;</div>

</div> <!-- end content-wrapper -->

<div id='footer-wrapper'>
<b:section class='footer' id='footer'>
<b:widget id='Text1' locked='false' title='Blogger Template | Bordr' type='Text'/>
</b:section>
</div>

</div></div> <!-- end outer-wrapper -->
</body>


For simplicity, ignore the code in light grey. They are either comments or 'default' codes to make things work properly that doesn't need to be tampered with. The core part of the codes can be sectioned into 4 parts:
  1. Header (in red)
  2. Main (in green)
  3. Sidebar (in red)
  4. Footer (in brown)
You'll see in the above that all the codes are first wrapped in the body tag, followed by the outer-wrapper tag, then the wrap2 tag. These wrappers are used to group the containers together so that they can be easily editted together. Using wrappers also make placing the containers much easier especially if you want to use additional sidebars or extra containers (such as a banner or linkbar containers as in most of my templates). In the explanation below, I'll only refer to the outer-wrapper as the larger wrapper without referring at all to the wrap2 wrapper. They're just the same (I'm not even sure why the wrap2 is there in the first place).

Inside this large container, you'll see 3 wrappers - header-wrapper, content-wrapper, and footer-wrapper. They are positioned vertically with the header-wrapper being at top and the footer-wrapper being at the bottom. It's simply because in the code, the header-wrapper is called first, followed by the content-wrapper, and finally the footer-wrapper. At this point, you don't even have to know what's inside the content-wrapper - this makes it much cleaner and easier as oppose to not having the content-wrapper and having to deal with the main-wrapper and sidebar-wrapper together all at once. It'll be a big mess then.

Because the outer-wrapper is the largest wrapper, you have to make sure that the widths of all the other wrappers inside it is less or at least equal to the outer-wrapper's width. But, if you add borders, that'll add extra pixels to whichever wrapper that you're adding the borders too. So be careful when adding borders!

Adding a new wrapper (container) in between any of these wrappers is easy. Just paste in a wrapper code (see below for example) and rename it with a new name, say a banner-wrapper. The preferred='yes' command will make an 'Add Page Element' button that'll allow you to create new widgets.

<div id='banner-wrapper'>
<b:section class='banner' id='banner' preferred='yes'>
</b:section>
</div>


Adding a wrapper only creates a new container, or block, in your blog. In doesn't set how it's going to look or where it's going to be located. To customize how it looks and where it's located in the blog, you NEED to tweak the CSS codes.

Inside the content-wrapper, you have the main-wrapper and sidebar-wrapper. To have these two wrappers side-by-side as commonly seen in blogs, you have to set the widths of these 2 wrappers such that it's equal or less than the width of the content-wrapper. Plus, you have to add certain commands in the CSS Styling code so that they'll sit next to each other. Otherwise, they'll just fall vertically on top of one another. Typically, you need to use the 'float:left' command for this. See some template examples to check more on this. If you want to add more sidebars, say a 3-column template, you simply need to add more sidebar-wrapper code (in blue). Read more in Tutorial 10 to know how to add or change sidebars.

Once you've understood the basic idea behind the Body code, it's easy to see now why the common structure of the Blogger template code looks the way it is (see below for a 3-column example). If you want to rearrange or add new containers or wrappers, what you simply need to do is to modify the Body of the code. It's that easy! But then, you have to tweak the CSS code to set how it's gonna look in the blog.


***************************************
Next Tutorial:
More explanation about the Body section of the code is given in Tutorial 9.

Read more...

Blogger Template: inSydes

>> Browse templatesMoney tips10 comments

Download | Demo

This is my 30th template, derived from the original template Sydes. When installed, you need to upload a header image with a size 550 x 200 pixels. Don't forget to fill in the Linkbar URLs too.

Read more...

Blogger Template: Sydes

>> Browse templatesMoney tips21 comments

Download | Demo

The idea for this template came from one of the comments I received in this blog. It was a question on how to make a sidebar that goes up all the way next to the header. My quick thought was that it was an easy thing to do; simply make a new wrapper for the sidebars and boom they go. But making it work is far from easy, if not difficult.

Like always in my templates, once installed, you have to upload a header image with a size of 550 x 150 pixels. The name Sydes refers to the focus that I put to make sure that the sidebars work the way they do in this template.

Read more...

Blogger Template: MidBasyc

>> Browse templatesMoney tips48 comments

Download | Demo

This template is another variation of the original template Basyc. The major change is that the Post column is placed in the middle. Plus, I made some minor code tweaking to make it a little bit different from the original template.

As usual, you need to upload a header image (900 x 200 pixels) and hide the default Blog Title and Blog Description texts. I saw some blogs that use my templates forgot to hide the Blog Title and Description texts; the header would have been much nicer if they hide these texts and made their own Title and Description texts as part of the header image graphic.

Read more...

Blogger Template: FulBasyc

>> Browse templatesMoney tips19 comments

Download | Demo

This template is a variation from the Basyc template; the changes were made simply by using the Fonts and Colors tab - no XML and CSS tweaking! This is just to show just how much you can modify easily without tweaking the codes.

When installed, you need to upload a header image with a size of 900 x 150 pixels and fill in the Linkbar URLs. It's best to hide the Blog Title automatically set in the Header and use your own Blog Title text written on your header image.

Read more...

Blogger Template: Basyc

>> Browse templatesMoney tips13 comments

Download | Demo

This new template is an improved version of the older template Kleen. It's much more versatile and flexible in that it's so much more customizable in a much neater way compared to all the older templates. There are a total of approximately 55 items that you can customize, including some borders and header underlines. For this template, the customization items are ordered more clearly in the Fonts and Colors list.

Once installed, you must upload a header image with a size of 900 x 150 pixels. It's best to hide the Blog Title automatically set in the Header and use your own Blog Title text written on your header image. The header image is bounded within a 3-pixel border with a color that can be set easily. If you don't like the border, simply set the border color to blend with the background color.

I made this template with a somewhat 'basic' layout because there's a lot of people that have been using my Kleen template and liking it because of its simplicity. So I felt drawn to improve it so that it looks cleaner with more flexibility and control given to the users to customize it completely. Click here to see how much you can modify simply from the Fonts and Colors tab.

Enjoy!

Read more...

Blogger Templates: Thris

>> Browse templatesMoney tips11 comments

Download | Demo

This new template has 3 sidebars with one large sidebar at the top. I made it specifically to put your large Adsense box in there (see the demo).

When installed, upload your own header image with size 520 x 145 pixels. Also, don't forget to fill in the Linkbar URL box next to your header image.

Read more...

Blogger Templates 1 - 20

>> Browse templatesMoney tips15 comments

All templates | Templates 21 - 40 | Templates 41 - 60

Click below to view the demo page or download the XML file. The order starts from the most recent one.


















































































Read more...

Blogger Template: NuKleen

>> Browse templatesMoney tips18 comments

Download | Demo

This template is an improved version from the Kleen template. More careful tweaking was given to minor details - the outcome is a much cleaner template. I've tweaked almost all parts of the template elements to make sure that everything blends nicely together. As always, you can do major changes simply from the Fonts and Colors tab.

When installed, don't forget to upload a header image and fill in the Linkbar URLs. The image size has to be 950 x 200 pixels. Another thing, I've included an option to add banners below the header - this is great for those who'd like to put large horizontal ads there. See my demo blog to check this out. If you don't like this option, you can always leave it empty. It'll work fine.

I use an image as a background of the body. If you want to get rid of this and use a plain colored background instead, simply delete the red part of the code below. Then use the Fonts and Colors tab to modify the background color. Locate this code in Section 3 of the template code structure.

body {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
min-width: 900px;
text-align: left;
color: $textColor;
background: $bodybgColor;
background: url(http://farm2.static.flickr.com/1432/539091444_c660190e24_b.jpg) repeat left top;
background-attachment: fixed;
font-family: verdana,helvetica,tahoma,arial,Sans-serif;
font-size: 100%;
}

Read more...

Blogger Template: NuBordr

>> Browse templatesMoney tips14 comments

Download | Demo

This is a variation of the original Bordr template. Again, you have to upload your own header image (size: 950 x 150 pixels) and fill in the Linkbar URLs when first installing this template.

The major difference is that I made the large border thicker than in the Bordr template, plus some minor CSS changes in the layout graphics and positioning. Other than that, I made all the other font and color changes from the Fonts and Colors tab, which you can also do easily.

I made this template variation to show that you can do a lot of customization (or damage, however you will) from the Fonts and Colors tab alone. Plus, the thicker border might be more appealing to some other users.

I also put my template credit further down to the edge of the screen to 'hide' it from spoiling the beauty of your blog. This is my way of saying 'please don't delete my credit to this template design if you don't change the CSS code much'. To me, giving due credit to the rightful person is an important act of honesty - it can't get any more basic than this. It's understandable not putting the credit if a lot of changes and damages have been done to the CSS code; but if the code is as it is, or if the modification is less than 10%, or if the customization is only through the Fonts and Colors tab, then it should come from within to do the right thing.

Anyway, have fun! :)

Read more...

Blogger Template: Bordr

>> Browse templatesMoney tips19 comments

Download | Demo

This template is named Bordr for its bordered feature. When first installed, you must put your own header image (size: 950 x 150 pixels) and fill in the Linkbar URLs in the Header section. Otherwise, the Header will be empty. Another new feature on this template is that you can add a large horizontal ad banner just below the Header. This is really neat for those of you who like large ad banners at the top. check out the demo.

You can modify this template easily from the Fonts and Colors tab in the Layout page. Among other standard easy customizable items, you can also change the thick and thin border colors.

On this 22nd Blogger templates, I have refined a lot of my techniques creating the templates. The template and the layout page is now much cleaner, and I've solved a lot of small alignment bugs between different browsers. So I'll be using this template to build on newer templates.

It'll be good to know what you guys really like or want in a 'monetizing template' in the comment section. That way I can add these ideas in my newer templates.

Read more...

Setting the Template Size

>> Browse templatesMoney tips190 comments

Blogger Template Design: Tutorial 7

Setting the template size is probably one of the first things you need to do when starting to design a new template. The are two ways to set the size (basically the width) of a template:
  1. Setting the size to be fixed with a certain width, say 800 pixels.
  2. Setting the template to have a fluid size, which means the width changes with the browser or screen size.
Setting a fixed template size:

To set a template width, you actually have to set the width of a few large containers. The most common containers to set the widths are:
  1. Body
  2. Outer-wrapper
  3. Header-wrapper
  4. Content-wrapper
  5. Footer-wrapper
  6. Main-wrapper
  7. Sidebar-wrapper*
  8. Footer-wrapper
*Note: You can also just set the widths of sidebar1 and sidebar2 containers without setting the sidebar-wrapper width. Setting the sidebar-wrapper width is convenient if both sidebars have equal widths.

In most of my newest templates, I also set the widths in the containers just inside some of the wrapper containers (which is redundant) to avoid some minor alignment bugs that may appear. The widths of these containers are set equal to the widths of their parent wrapper containers. These containers are:
  1. Header
  2. Main
Here is a sample code from the Generic Blogger Template showing you all the container widths that are set to make sure the template width is properly set (only the part that concerns the width-setting are shown). In this sample, the template width is set at 800 pizels.

body {
min-width: 800px; }

#outer-wrapper {
margin: 0 auto; /* to make the template lays in the screen center */
min-width: 800px;
max-width: 800px; }

#content-wrapper {
min-width: 800px;
max-width: 800px; }

#header-wrapper {
min-width: 800px;
max-width: 800px; }

#main-wrapper {
min-width: 400px;
max-width: 400px; }

.sidebar {
padding: 10px 10px 10px 10px;
min-width: 180px;
max-width: 180px; }

#sidebar1 {.....}
#sidebar2 {.....}

#footer-wrapper {
min-width: 800px;
max-width: 800px; }


The body is set with a command min-width = 800px, which means that the smallest width it should have is 800px. If it's set with a command width = 800px only, then the template width might shrink in some situation. Setting it with a min-width guarantees the smallest size it will take.

The next container just inside the body is the outer-wrapper. It's usually common to set it with a command width = 800px only. But as I've explained about my strictness in setting the width to avoid any alignment bugs, it's becoming my habit to always set the container to have a min-width and max-width of the same value so that the container size is exactly that size - it will not shrink or widen to any different value. Another thing about the outer-wrapper is that this is where you set the command to either place your template at the center of screen or float to the left of it. In this case, setting margin: 0 auto will float the template to the center. Just writing margin: 0 will float it to the left as a default position.

The next 3 large containers, the header-wrapper, the content-wrapper, and the footer-wrapper is usually set to be the same size; in this case it's 800px. In any case, they can be set smaller than the outer-wrapper width but not any bigger than that because the outer-wrapper 'wraps' these 3 containers inside it. Another thing, if you add left and right borders, then you'll increase the width, and the outer-wrapper will just cut out whatever that's bigger than itself on the right side. So, if you do add borders, say 2px left and 2px right for the header-wrapper, then you have to set the header-wrapper width to be 796px so that the total would be 796+2+2 = 800px. The same goes for all the other containers.

The last 3 containers are the 2 sidebars and the main-wrapper. Because they sit side by side, you have to make sure the total width = 800px or less, but certainly not more. In this case, I set the main-wrapper to be 400px and both the 2 sidebars to be 200px. But because I added padding of 10px left and right of each sidebars, which pushes the sidebar border outward, I'd have to reduce the sidebar width to be 180px so that the total sum after adding the pads would be 200px. You have to note that the largest sidebar container is the sidebar-wrapper (not just the sidebar). I could have set the width of the sidebar-wrapper instead of the sidebar, but I prefer to set the sidebar width because sometimes I may set the 2 sidebars to have different widths. But, this is all just a matter of personal style; other template designers may have different way of setting this sidebar widths. As long as it works, that's all that matters.

Setting a fluid template size:

To set a template with width that changes with browser or screen size, please refer to W3Schools Tutorials for more details. In my templates, I haven't made any such templates and so my experience in setting a fluid sized template is not much. Once I have more experience in this, I'll post the tutorials on it.

***************************************
Next Tutorial:
The next step in this tutorial is a quick explanation on the Body section of the Blogger template code.

Read more...

Tutorials on Blogger Template Design

>> Browse templatesMoney tips391 comments


Blogger Template Design: Introduction


This tutorial is a very quick guide to teach you how to change or design your own Blogger templates. It's easy to understand and follow, especially to those who has no knowledge in HTML programming.

The tutorial is split into a number of sub-tutorial modules that explain specific parts of Blogger template design in detail. The best way to learn is by going through the module sequence one by one. But if you are familiar with the basics, you can jump into the more advanced modules. The earlier modules are focused on explaining the basic structure of the template design and the template code so that you understand more about a Blogger template in general. The later modules explain each section of a Blogger template in more detail and help you go through the process of coding and designing a template in a step-by-step approach.

In the tutorial, some of the names and terms are based on my own template design, but I'll explain them as general as possible so you get the bigger picture and can adapt to different template designs.

Tutorial Contents


Read more...

Using the Generic Blogger Template

>> Browse templatesMoney tips125 comments

Blogger Template Design: Tutorial 6

Here I'll explain how you can use the Generic Blogger Template to practice on tweaking the codes and modifying your templates. The ultimate goal is surely for you to know how to design your own template, but knowing how to modify the template first (and to get a feel how the template 'react' to your code modification) is an important step that you need to go through before starting to design your own template.

Changing your template is not as simple as changing or adding some codes, hitting the "View Blog" button, and thinking that everything will go as perfect as you plan. Lots of the time you'll see things go off differently from what you've expected. Especially if you're not a web programmer. I'm not one and I did go through a lot of going back and forth between the "Edit HTML" page to the "View Blog" page before getting what I really wanted.

So the best thing to do is really to experiment first with the 'behavior' of the template codes, see how they make your template change, and finally understand (more or less) why they change the way they change: simply put - be ONE with the code!

To make it easier for you, I've created a Generic Blogger Template that you can download to play around with. To be honest, it's an ugly template, but the different container colors will help you see how things actually change. The first thing you need to do is create a Test Blog using your Blogger account. Then upload the Generic Blogger Template into your Test Blog. Put a few posts with lots of text, images, and add some sidebar widgets too so that you can see a more realistic effect.

The next step is just to start playing around. It's best to do things one by one. Say, choose one of the containers, the header-wrapper maybe (look in Tutorial 5), and change some of the command codes for that container. Then view the new templates to see if the changes is really what you've expected. As starters, try to play around the most with padding and margin (playing with colors, fonts, or any appearance-setting commands are not as challenging as playing with layout-setting commands). Don't play yet with the template size-setting commands like the width of containers because this involves other containers also and can get really messy. We'll do this later. Once you're confident with how things behave in one container, move on to other containers or do multiple containers in one go.

Within a short time, you'll be confident enough with this Generic Blogger Template that you can start tweaking your own blog template codes. At this point, I won't say that you'll know everything there is to know about tweaking codes, but you'll know enough to do considerable makeover on your template and enough to start learning new things and dealing with new problems on your own. The key point here is your coding skills will grow in time - May the CODE be with you!

***************************************
Next Tutorial:
Once you are comfortable with tweaking the codes and changing your own templates, the next step in this tutorial is to guide you on setting the template size or width and the size of all the containers within it.

Read more...

Common Containers and Elements in a Blogger Template

>> Browse templatesMoney tips113 comments

Blogger Template Design: Tutorial 5

Here's a list of all the common containers and elements in a Blogger template and their funtions (elements are basically any object that make a blog funtions and containers are large elements that contains smaller elements or some other contents).

These common elements that I'll show are not necessarily the elements that exist or must exist in all Blogger templates, but are just some common elements that controls a large part of your template style. Knowing these elements will make it a lot easier for you to know where to look for in the template code and how to deal with other new elements that you may find in other templates.

I'm not going to list all the elements, but only enough elements so that you get the ideas and can understand all the other elements on your own. I will refer to the images from the CSS Styling Section below to make things easier to follow.


The symbols # and . show the attributes of the element (sort of a classification of the element type). But you don't have to worry much about this for now. If you want to know more about this, I suggest the W3Schools tutorials.

Global:
  • body {.....} - general properties for the whole template.
  • #outer-wrapper {.....} - the starting and largest container for all your template contents. Inside this is the header-wrapper, content-wrapper, and footer-wrapper.
  • #content-wrapper {.....} - the wrapper that contains sidebars and main containers.
  • a {.....} - this sets the overall properties of your link text.
  • a:visited {.....} - this sets the overall properties of your visited link text.
  • a:hover {.....} - this sets the overall properties of your link text when the mouse hovers over it.
Because all element codes must be contained within the {.....}, I'll just write the element titles after this.

Header:
  • #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:
  • #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.
  • h2.date-header - 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).
Sidebar:
  • .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.
Miscellaneous:

Technically, the Profile (About Me) container is placed inside a sidebar, but I'm putting it in the Miscellaneous section because there are many smaller elements that belong together with the Profile container and putting it in the Miscellaneous reduces the mess.
  • #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.
  • blockquote - sets the quoted text in your posts.
  • code - sets the text contained within the code tags in your posts.


Post-Footer:
  • .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.
Comment:
  • #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.
Footer:
  • #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.
Now that you know these containers and elements, you'll know where to look for in the template code whenever you want to change something about your template (fonts, text colors, background colors, padding, etc). What you do then is simply modify the codes inside the {.....} for that container or element only.

***************************************
Next Tutorial:
The next tutorial is on using the Generic Blogger Template to learn how to tweak the codes.

Read more...

Setting the Properties of a Container

>> Browse templatesMoney tips86 comments

Blogger Template Design: Tutorial 4

In this tutorial, you'll know the basics of what code sets the properties of a container. To make things simple, we'll look at 2 container blocks only - Main and Post. Once you know these, the basic ideas for all the other containers are pretty much the same.

Here is a sample code for the 2 containers:
#main {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
min-width: 400px;
max-width: 400px;
background: $mainbgColor;
color: #111111;
font: $textFont;
}

.post {
margin: 0px 20px 10px 0px;
padding: 10px 20px 10px 2px;
line-height: 1.5em;
text-align: left;
background: $postbgColor;
}

The #main and .post are the titles of each containers. Each container codes must be contained within {...}. For the explanation below, we'll focus on the codes inside the post block, especially for the explanation on the margin and padding (the codes colored in red).
  • Margin - sets the distance between the border of the container to the border of a parent (larger) container outside it. There are 4 numbers defining the Margin property. The 1st number sets the top margin, the 2nd sets the right margin, the 3rd number sets the bottom margin, and the 4th number sets the left margin. It basically sets the whole margin in a clock-wise fashion starting from the top. In the case above, the parent container for the post container is the main container. See how the dashed border for the blue (post) container is placed inside the green (main) container following the post block's margin command (the codes in red). If the post's margins are all set to zero, then the post container would be exactly the same size as the main container. Think of the Margin as a command that moves its border away from a parent border. Another thing, Margin can have a negative value, which means that it moves toward the parent border and may overlap it (not away from it).
  • Padding - sets the distance between the border of the container to the border of a child (smaller) container inside it. In the case of the post container, the child container is the post-body. The 4 numbers defining the padding sets the padding in a clock-wise fashion also, just like the Margin property. See how the post's padding puts the post-body inside the post container, away from the dashed border. Unlike the Margin, think of the Padding as a command that moves a child border away from its border. Padding values cannot be negative.
  • Min-width and Max-width - sets the width of the container. Usually, it's enough to write it as width = 400px (for example), but it's becoming more of my habit to set the width as strict as possible, because I sometimes saw that if it's not written strictly, the container width might shrink and expand freely on some situations and in some different browsers. So by setting the width strictly, I made sure that it looks exactly like I want at all times in all browsers (basically getting rid of alignment bugs). If you look at my newer templates, I even set the width redundantly, say in Main-wrapper and then in Main containers eventhough they are pretty much the same. Doing it this way solves some alignment bugs that I saw (eventhough I don't really understand why it solves it by writing it redundantly).
  • Background - sets the background color of the container. It uses the hexadecimal code for colors. See here for all the color values. You can also set a background image that repeats itself to cover the whole container block. The way to do this is by pointing to the URL of an image. For details on how to do this, see W3Schools tutorials. You can also set the value to be $samplevariable, where the variable is the one that you define in Subsection 1 in CSS Styling Structure.
  • Color - sets the color of your text using the hexadecimal color code, or the variable defined earlier in Subsection 1.
  • Font - sets the font of your text. You can use the variables set in Subsection 1 also. See W3Schools tutorials for more details on setting the font properties.
  • Text-align - sets the alignment of your text. The 3 options are either left, center, or right.
  • Line-height - sets the distance, or height, between two text lines.
My tutorial just gives the basic idea on some of the codes in the Blogger templates. I'd say the most important ones for a basic understanding are the margin and padding commands. If you want a more detailed explanation on CSS styling language, I recommend w3Schools CSS Tutorial as a quick and easy resource center.

***************************************
Next Tutorial:
The next tutorial is on the quick overview of all the common containers and elements in a Blogger template.

Read more...

The structure of CSS Styling Section

>> Browse templatesMoney tips31 comments

Blogger Template Design: Tutorial 3

In this tutorial, I'll show you the structure of CSS Styling Section, which is the 2nd Section in the Blogger Template Code Structure. Again, not all templates have the same structure. It basically comes down to the personal style of a designer. But I've found out the structure that I'll show you is quite logical and makes things a lot easier when coding, debugging, and customizing your template. Once you've understood this tutorial, you can later change the style and structure any way you want. But first you have to understand them and I've put out here a very easy structure to understand and use.

I've cut down the CSS Styling Section into 9 smaller subsections. For now, I'll describe the subsections in general. We'll get to the details on the coding inside these subsections later in the following tutorials. Always refer to the Structure of a Blogger Template to help you understand better the subsections and containers that I explain here.



Subsection 1 - Variable:
This subsection contains the declaration (the introduction) of the font and color variables that appear in the Fonts and Colors tab in the Layout page. For example, the Text Color or the Text Font variables that you can choose and modify using the Fonts and Colors tab. In my templates, I've added a lot of variables (close to 40+) compared to some of the standard Blogger templates to make it easy for you to customize a lot of things on the template.

Subsection 2 - Global:
This part contains the code to control the general appearance and layout. If you look at the green bar above, you'll see the code "body {.....}". This means that every code that goes inside the {.....} will control the general properties (size, layout, & appearance) of the body of the template (everything that the computer screen covers). For example, it controls the width of your whole template and the background color or image. But it doesn't control the detailed properties of the whole template (that is done by all the other subsections). Or, if you do set the detailed properties inside the body container, say the Text Font, and then reset the same properties inside a smaller sub-container, the properties set in the body container will be overridden, or canceled.

Inside this subsection, you will also find other important large containers - the Outer-wrapper and the Content-wrapper - so this subsection is where you want to look for if you want to tweak those containers.

Subsection 3 - Header:
This part controls the properties of everything inside your Header-wrapper container. The most common ones are the Blog Title and the Blog Description. In most of my templates, I've added an extra object in the Header-wrapper - the Linkbar (or the horizontal menubar). Typically, you can't add extra object in the Header because you can't use the Add Page Element tab. To add the Linkbar, I had to change the 3rd Section of the template code structure (which is the Data section). In my own blog (dzelque.blogspot.com), I added something else, which is the Google Search Bar. Ideally, you can add just about anything you want there, if you know how to deal with the 3rd Section. We'll get to this later.



Subsection 4 - Main:
This part controls the properties (size, layout, and appearance) of everything that the Main-wrapper block contains - the Date Header, the Post, the Comment, the Feed Link, and any widgets that you drag into the Main section using the Add Page Element tab.

Subsection 5 - Sidebar:
This part controls the properties of everything inside your Sidebar-wrapper - for example the Labels, Blog Archive, Adsense units, Link Lists, etc. But, it doesn't set how many sidebars you have or their locations on the blog (example Sidebar-Main-Sidebar or Main-Sidebar-Sidebar). That part is done in the Section 3 of the Blogger Template Code Structure - the Data Section.

Subsection 6 - Miscellaneous:
This part controls the properties of additional elements in your blog that's not controlled by all the above subsections. These elements are the Profile (or the About Me block), the Blogquote, and the Code. It means if you want to, say, change the color of the quoted text or the font of your nickname in the About Me block, this is where you want to look for to tweak it.



Subsection 7 - Post-Footer:
In my Generic Template, this part controls the properties of 3 things:
  1. The Post-Footer - the texts below your post body. This is the part that contains information about your post, or the texts that say "Posted by YourNickname, Labels: ....., 5 Comments, etc.
  2. The Blog-Pager - the links at the bottom of your blog posts that say "Newer Posts, Home, or Older Posts".
  3. The Feed-Link - the link that says "Subscribe to: Posts (Atom)".
Subsection 8 - Comment:
This part controls all the properties of the Comments section in your blog.

Subsection 9 - Footer:
This part controls all the properties in the Footer section. Generally, the Footer section contains some text explaining the ownership or copyright of a blog. In some other blogs, they also put extra stuff in the Footer section, like the Recent Posts or Popular Posts in 2 or more columns. Basically, you can just put about anything in the Footer as in the Sidebar. But if you want to add more than 1 column to your Footer, you have to tweak the 3rd section of your Blogger Template Code Structure.

***************************************
Next Tutorial:
The next tutorial is some basic explanation about the codes to Set the Properties of a Container for you to get the ideas on what the codes inside all the containers mean.

Read more...