WordPress.org

Forums

header img not as bg (6 posts)

  1. tronicscribe
    Member
    Posted 10 years ago #

    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.

  2. Chadwick
    Member
    Posted 10 years ago #

    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>
    </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.

  3. Lorelle
    Member
    Posted 10 years ago #

    Also, see the article:

    http://codex.wordpress.org/Designing_Headers for more information.

  4. tronicscribe
    Member
    Posted 10 years ago #

    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="http://www.tronicscribe.com/wordpress/wp-content/
    themes/tsthemeone/images/tslogo.jpg" alt="tronicscribe logo" class="centered">
    <div class="description"><?php bloginfo('description'); ?></div>
    </div>
    </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.

  5. Lorelle
    Member
    Posted 10 years ago #

    <img scr="http://www

    Change that to:

    <img src="http://www

  6. tronicscribe
    Member
    Posted 10 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic