Translate This Blog
Remember To Always Back Up Your Template Before Attempting Any Of The Tweaks On This Site

Add CSS Function (Blogger)

The Add CSS function can be found at the bottom of the  Advanced option in the Template Designer. This function can be used with the Layout and Designer templates.

  Basically this option overrides the existing template coding to allow modifications  to the template. This is a safe and easy way to edit the template coding without the fear of messing anything up.  This also allows a live view of what the modifying changes. You can also remove any added in coding by simply going back to the Add CSS screen.  Now this is not changing the template code but adding a code to override the existing coding. This allowing your Template Designer functions to remain working.

Note: All added CSS will be place above the <:b/skin> tag in the Edit HTML page. So you will not find the added CSS coding in the element modified. 

 About Page Source:

Since the Designer templates are almost completely made up of  /* Variable definitions  it is best to formalize yourself with the Page Source. The Page Source shows the interpreted coding after the /* Variable definitions are added.

To access the Page Source you can right click and select "View Source" or "View Page Source" depending on which browser you are using.  For Fire Fox the  hot keys  Ctrl+U can pull up the source as well. Other browsers you may need to go to the  View in the top tools of your browser. In here you can also locate the source.

Example of Page Source:

So in your Edit HTML page you may see a code like this below.
 color: $(body.text.color);
But in the Page Source this code will display as something like this
color: #e1e1e1;
This  above is the interpreted coding.

How to Use Add CSS:

When using the Add CSS function you must specify what  element you wish to modify.

Examples of Elements:
body {
.content-inner {
#header-inner {
.header-inner {
.main-inner {
This is just some of many elements you can choose from. You will need to have some basic knowledge of coding to understand what your looking for.

After you have assigned the area you will need to add in the modifying code and add the closing tag.
.header-inner {
padding: 20px 0 0;
}
Red is the modifying code and the Orange is my closing tag.

You do not need to enter in the full  code you find in the Page Source. This is unneeded since the code is already in the Edit HTML page. All you are doing is modifying the existing  code.

So for a example if my Page Source displays this for the element.
#content-wrapper {
width: 980px;
margin: 0 auto;
padding: 0 0 5px;
text-align: left;
background-color: #000000;
border: 1px solid #02021b;
border-top: 0;
}
Now lets say I want the text to be align to the center. I would only need to add this code below.
#content-wrapper {
text-align: center;
}
I hope this post was understandable and you can now begin experimenting with the Add CSS function. This option was added by Blogger so we don't mess up the templates coding to the point that the Template Designer options no longer work.

4 comments:

Rainysoul said...

Most of what you're saying makes sense, however when I tried adding:
#content-wrapper {
text-align: center;
}
to the css area, there was no visible change.

AiresOFwar said...

Some template may vary and could have other conflicting CSS in them. If you want to send me a contact email with your blog URL in it. I would be glad to look it over for you.

Psofios Korios said...

Hello Aires, very interesting blog.
I have been trying setting my blog korioi.blogspot.com to an "auto-width" mode via Add CSS but so far I haven't been lucky.
I prefer Add CSS because it has a preview window and
this way you avoid messing your template.
That is how, naturally, I set the transparency.

I've used some of your tips, some work some don't.
The content-wrapper works but not the outer-wrapper
which -I guess- is the CSS equivalent to "body"

The reason I need auto-width is because I have been reported problems with high resolution monitors (too large margins left and right).
I set the width at 950px because I mostly use a netbook with 1024 resolution, but that creates huge margins on both sides with, say, 1080p screens.
Any suggestions?

AiresOFwar said...

You point out a very good flaw that has been troubling web designers since the dawn of the internet. The problem being is your viewers maybe using different screen resolution, browsers, operating systems, ext which will cause the design of your blog to very from one person to the next. I use a metaphor of comparing one person's opinion or perspective on a single idea to describe the problem here. No matter what you do or how hard you try the thoughts on a matter will very from one person to the next. Just as it would from one computer to another the design of your blog will look different. As you have found out you can use auto property's to try and correct the issue but this is more of a discretion then a fix. Outside of that all I can suggest is finding a design that looks good on all or most computers and go with that.

Post a Comment

Please don't post hyperlinked text within the comment box! It will not be published and you will be marked as spam.

Web Design Blogs PageRank