Support » Themes and Templates » header img not as bg

  • I would like to use an image in my header to replace the text title that is created within the options menu. I do not want to put the image in as the header background. so, is there a way to put an image over the title or in place of the title. however, I would still like to keep the tagline. I hope this made sense. thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • In your header.php file there should be a line like this:
    <div id="header">
    <div id="headerimg">
    <h1><a href="<?php echo get_settings('home'); ?>"><?php bloginfo('name'); ?></a></h1>
    <div class="description"><?php bloginfo('description'); ?></div>

    Remove the following:

    <h1><a href="<?php echo get_settings('home'); ?>"><?php bloginfo('name'); ?></a></h1>

    That removes the title of the blog. The other line is for the tagline.

    To add a image, not as a background, just add html such as this to your header.php :

    <img src="imagename.extention">

    To keep your document valid, you will have to set the size & attributes of that header image in your style.css. This can be done by using this code in your header.php :

    <img scr="imagename.extention" class="headerimg">

    and this code to your style.css :

    .headerimg {
    width:700px; /* if you want it 700px wide */
    height:100px; /* same as above */
    margin:0px; /* to make it fit nicely :) */

    But if your using a image as a background will move your tagline text below the image. So in my opinion it would be better to use the background image on the headerimg id you want to use.

    Also, see the article: for more information.

    ok, I tried editing the header.php file, and I thought I did it all right, but its not showing the image. it does however show the alt text I set for the image. here is the coding:

    <div id=”page”>

    <div id=”header”>
    <div id=”headerimg”>
    <img scr=”
    themes/tsthemeone/images/tslogo.jpg” alt=”tronicscribe logo” class=”centered”>
    <div class=”description”><?php bloginfo(‘description’); ?></div>

    I used the “centered” class instead of the headerimg class you suggested because in the kubrick theme there was already a class for images. but I did also try making the headerimg class and using that, which didn’t work or didn’t help. am I doing something else wrong? thanks again for all the input.

    <img scr="http://www

    Change that to:

    <img src="http://www

    LOL, holy crap. Thanks a tone. sorry I wasted time asking about it when I should have really looked over the spelling of all my code. thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘header img not as bg’ is closed to new replies.