How to Change Header Title Font, Size & Color

Intro!

This is a simple Blogger tut to tell you how to change the header title font. First of all, you should know which CSS code is responsible for your header title appearance:


#header h1 {
margin:5px 5px 0;
padding:15px 20px .25em;
line-height:1.2em;
text-transform:uppercase;
letter-spacing:.2em;
font: $pagetitlefont;
}


How to modify the style???


Now you know the CSS of your title. You can make modifications in it and see your results. Remember, these CSS changes will be visible only on main page because your header title behaves as a link in all other pages. First, let's customize it's appearance on main page.

----------------------------------------------------------------------------------
=> Add a 'font-family' Property!
----------------------------------------------------------------------------------

I want my header title to be in 'Arial' font, the code will be:

#header h1 {
margin:5px 5px 0;
padding:15px 20px .25em;
line-height:1.2em;
text-transform:uppercase;
letter-spacing:.2em;
font-family: arial, "lucida console", sans-serif;
}

Please note that I'm using 3 fonts (arial, "lucida console", sans-serif) in the above CSS. The reason is that if 'Arial' is not available on your visitor's pc then the font on 2nd position ("lucida console") will be used.

----------------------------------------------------------------------------------
=> Add Style Definitions for Header Title Font on Pages Other Than Main Page!
----------------------------------------------------------------------------------

As I told you before that your header title works as a hyperlink in all other pages of your blog other than the main page, so let's add some more CSS to customize the appearance on pages other than the main page.


#header h1 {
margin:5px 5px 0;
padding:15px 20px .25em;
line-height:1.2em;
text-transform:uppercase;
letter-spacing:.2em;
font: $pagetitlefont;
}

/* I've added a new tag which will change header title appearance on pages other than main page */

#header h1 a {
text-decoration:none; /* you can add 'underline' or 'overline' instead of 'none' */
color: #FFFFFF; /* you can add any color you want by changing 'FFFFFF' */
font-size: 25px; /* means title font size will be 25px on all pages other than the main page */
}

/* hover definitions will become alive when you bring mouse over title, this will also work on all pages other than main page */

#header h1 a:hover {
text-decoration:underline; /* title font will be underlined on mouse over */
color: #000000; /* title will become black on mouse over */
font-size: 10px; /* guess what will happen to font size on mouse over */
}

Good to Know!

I always try my best to share all the knowledge I've with you guys. You can always do experiments and share your results with me in comments. You should go to W3Schools.Org to read more about font properties.

8 comments:

  1. I am 70ish so bear with me? I have added a customized font (pea lauryn)to my blog-- http://liittlebits.blogspot.com/. When I edited my Layout HTML with the below and hit Preview, nothing happened. Also, is there a listing for the font colors somewhere that I can download for free? Lucy

    header h1 {
    margin:5px 5px 0;
    padding:15px 20px .25em;
    line-height:1.2em;
    text-transform:uppercase;
    letter-spacing:.2em;
    font-family: pea lauryn, "lucida console", sans-serif;
    }

    ReplyDelete
  2. @ visit my, actually fonts will only appear if they're installed on the computer where the website is being viewed. For example, I can't see any website which is using "pea lauryn" font because this font is not installed on my computer. To see the installed fonts on your computer go to "C:\WINDOWS\Fonts".

    You should also declare your font in double quotes because every font name which contains a space must be declared like this:

    font-family: "pea lauryn", "lucida console", sans-serif;

    I'm in a great hurry... I'll tell you about colors a little later.

    ReplyDelete
  3. Hi Bilal, Im a beginner at blogger. I want to put an icon on my blog title but i dont know how to put on the place i want..could you help me? by the way, nice blog...

    HERE'S my SITE

    ReplyDelete
  4. @ Dr.P, please tell me whether you want your title to appear along with the icon or you just want the icon to appear and the title should be hidden???? I'd love to help you out!

    ReplyDelete
  5. I want it to appear along with the icon, i.e. icon first then the title but on the same line..

    ReplyDelete
  6. This solved my problem, thanks a bunches!

    ReplyDelete
  7. thanks a lot!! i've been looking for this. it help me a lot. my header font look pale before, but finally, i can change the way it look. looking forward for another great tutorial!

    ReplyDelete
  8. hi thank you but i have a problem with the size of the header when i try to change it the menu id damaged
    =>how van i change the header image size without damaging the menu links

    Thanks

    ReplyDelete

LinkWithin

Related Posts Plugin for WordPress, Blogger...