Putting an Image Into the Header



The image above is created from 6 different small images, but I took a snapshot of this image to create a single gif file for my header.

You would think that adding an image to the header would be easy enough, but as with most changes in Movable Type 4, it’s confusing to know where to put the code for any changes you want to make. I tried inserting the code directly into the stylesheet to begin with here, but the image didn’t display and the whole header formatting was thrown out. After lots of trial and error I decided the best place to insert the image was in the header template module.

Look for the following code:


<MTIf name="main_index">
<h1 id="header-name"><a href="<$MTBlogURL$>" accesskey="1"><$MTBlogName encode_html="1"$></a></h1>
<h2 id="header-description"><$MTBlogDescription$></h2>
<MTElse>
<div id="header-name"><a href="<$MTBlogURL$>" accesskey="1"><$MTBlogName encode_html="1"$></a></div>
<div id="header-description"><$MTBlogDescription$></div>
</MTIf>

And replace with this code, pointing to your header image:


<MTIf name="main_index">
<img src="http://www.yoursite.com/blog/images/image.gif" alt="" style="float:left; padding-right:10px;"><h1 id="header-name"><a href="<$MTBlogURL$>" accesskey="1"><$MTBlogName encode_html="1"$></a></h1>
<h2 id="header-description"><$MTBlogDescription$></h2>
<MTElse>
<img src="http://www.yoursite.com/blog/images/image.gif" alt="" style="float:left; padding-right:10px;"><div id="header-name"><a href="<$MTBlogURL$>" accesskey="1"><$MTBlogName encode_html="1"$></a></div>
<div id="header-description"><$MTBlogDescription$></div>
</MTIf>

I’m using the Unity Blue style for Babble On and added some top padding to the header name. In your stylesheet, at around line 218, you’ll see #header-name.

Add padding-top: 30px; to push the text down. You might need to play around with this to get it right for your blog.

1 Comment

Hi, im working with MT 4, and im want a flash animation is the header? How can i do that ?

Thanks ...


Leave a comment



Recent Entries

  • Send Entries Using HTML Formatted Email

    There used to be a plugin for earlier versions of Movable Type called "MT-Mail-Entry":http://www.nonplus.net/software/mt/MT-Mail-Entry.htm that allowed you to send friends a HTML-formatted email that included...

  • All Comments Not Getting Published

    I had a problem viewing some of the comments on one of my posts. I thought it must be a comment limit somewhere in the...

  • MT 4.23 Update Released

    Movable Type has released a security upgrade that fixes XSS vulnerabilities, and recommends updating to 4.23 as a mandatory. The vulnerability hasn't been exploited yet,...

  • Updated Joost Action Streams Plugin

    The plugin for [Joost Action Streams](http://mt4.juneeonline.com/babble-on/archives/2008/10/joost-action-streams-plugin.php) has been updated to include favourites. If you've previously installed this plugin I recommend deleting Joost from "Other Profiles"...

  • Adding the ShareThis Button to Mid-Century

    There's a tutorial on Rob Kenny's The Composing Stick with instructions for adding AddThis or ShareThis buttons to your posts. After receiving a request today,...

OpenID accepted here Learn more about OpenID