WordPress.org

Forums

[resolved] How do you add a logo to the left of the site title? (3 posts)

  1. eastbayjosh
    Member
    Posted 5 years ago #

    I want to add a logo to the left of the "Step by Step for academic success" on this website.

    Does anybody know how to do that?

  2. It looks like you will have to edit the header.php template file to add a <img> tag.

    I would look around line 44 and place the IMG tag within the "header" section.

  3. Michael
    Forum Moderator
    Posted 5 years ago #

    another possible way to do it, is to put the logo as a background image into the .logo class in the style.css of the theme:

    .logo {
    	width:400px;
    height:100px; /*new logo height */
    	float:left;
    background:url(images/my_logo.png) top left no-repeat; /*new logo image */
    }
    .logo h1 a {
    	color:#FFFFFF;
    	font-size:28px;
    	font-weight:normal;
    margin-left:100px; /*to shift header to the right by logo width */
    }
    .logo .description {margin-left:100px; /* new line added to shift description to the right by logo width*/}

    you then shift the header and description to the right, using margin:100px; (the number depends on the width of your logo image).

    and introduce the logo height into .logo

    (this example is assuming a logo image 100px square named my_logo.png, and save in the /images/ directory of the theme.)

Topic Closed

This topic has been closed to new replies.

About this Topic