Linking header image

Linking header image

Postby david » Thu Jul 01, 2010 9:46 pm

Hi,

I just celebrated one year of blogging, and all that time with anonymous elegance. I love the theme and see no reason to change it.

One thing I always wanted to do was make the header image link to the blog homepage. I've looked through the code but can't seem to figure out how to do it.

Here's my blog. I made some modifications to your theme. Hope you approve.

http://alifesworkmovie.com/blog/


Best,
David
david
 
Posts: 2
Joined: Thu Jul 01, 2010 9:36 pm

Re: Linking header image

Postby Mina » Fri Jul 02, 2010 4:48 am

Congrats on your 1 year! And I like what you did to the theme, your changes are great. :D

Okay, before I get into this I want to stress making backups in case something goes wrong or you change your mind...it's always better to be safe with these things. The only 2 files you'll be changing for this are header.php and style.css.

In header.php find this line:
  Code:
<h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>

and change it to:
  Code:
<h1><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></h1>


Then in style.css find this line:
  Code:
.header { background: #000 url(images/header.jpg) no-repeat; width: 750px; height: 200px; margin: 0 0 0 0; padding: 0; }

Remove this code:
  Code:
background: #000 url(images/header.jpg) no-repeat; width: 750px; height: 200px;

And add it to this line:
  Code:
.header h1 a { text-decoration: none; color: #EEEAE9; font-variant: small-caps; }

So it looks like this:
  Code:
.header h1 a { background: #000 url(images/header.jpg) no-repeat top left; width: 750px; height: 200px; text-decoration: none; color: #EEEAE9; font-variant: small-caps; display: block; }

There are a couple differences in this line that aren't in the original. The first is the addition of top left to the background: section, and the second is adding display: block; to the line.

That should do it. :)

Oh and on a related note, I noticed that you still have the default blog title showing up kinda hidden with the font color. If you want to remove it go back into the line of code from header.php (at the top of this post) and remove this section of code:
  Code:
<?php bloginfo('name'); ?>

That will just take the text (which you're really not using) off the header.
User avatar
Mina
Cloisters Mama
 
Posts: 364
Joined: Fri Aug 14, 2009 8:42 pm

Re: Linking header image

Postby david » Fri Jul 02, 2010 8:48 am

Hi Mina,

Thank you so much for your super speedy reply. I made the changes to the code and it worked like a charm. And you're right, I didn't know how to get rid of the text in the header so I made the font color and the bg the same color. Inelegant workaround. But now that too has been rectified.

Thanks again. Glad you like the changes I made to your fantastico theme.

Best,
David
david
 
Posts: 2
Joined: Thu Jul 01, 2010 9:36 pm

Re: Linking header image

Postby Mina » Fri Jul 02, 2010 6:19 pm

Good deal, enjoy your site! :D
User avatar
Mina
Cloisters Mama
 
Posts: 364
Joined: Fri Aug 14, 2009 8:42 pm


Return to Anonymous Elegance

Who is online

Users browsing this forum: No registered users and 1 guest

cron