WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Eleven header problem (3 posts)

  1. Steven Jones
    Member
    Posted 2 years ago #

    Hi,

    I have created a child theme for Twenty Eleven for my site.

    http://www.racenortheast.co.uk/

    In the parent theme css file there's a CSS rule that says:

    #branding img {
    width: 100%;
    }

    I however wanted my logo to have the following dimensions so I did this in my child theme stylesheet.

    #branding img {
    height: 100px;
    width: 234px;
    }

    However, as you can see the image on the right has taken the same dimensions. Is there anyway I can change the CSS so it doesn't dictate the width of my image and I can just set it in the HTML or let the browser show it at it's default width?

    Cheers,
    Steve

  2. Steven Jones
    Member
    Posted 2 years ago #

    Does anybody have an idea on this please?

  3. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    whan adding your logo image, add a css class to the img tag, and select that for the formatting;

    example:

    <img class="logo-image" src="http://www.racenortheast.co.uk/wp-content/themes/twentyeleven-child/images/racene.png" width="234" height="100">
    #branding img.logo-image {
    height: 100px;
    width: 234px;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic