Forums

why body class not changing #branding img - twentyten options (7 posts)

  1. developdesign
    Member
    Posted 1 year ago #

    I'm using Twentyten options, a child theme of Twenty Ten.

    I'm using the body class option to use different headers for the home page and the inner pages.

    The theme allows you to upload the header image via the Admin. The problem is that it isn't replacing the branding img via customizing the CSS. The height changes but the replacement image doesn't replace the original image.

    body.single #branding img
    {
    background-image: url("http://website.com/wp-content/uploads/2011/04/image.png");
    height: 120px;
    http://codex.wordpress.org/User:Esmi/_Changing_Headers_with_body_class%28%29

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    The technique you're trying to use won't work if you then upload a custom header image. The CSS for the custom image over-rides the external CSS.

  3. developdesign
    Member
    Posted 1 year ago #

    I'm not sure what you mean? How do I get one image to show on the inner pages using body.single #branding img and a second image to show on the front page using css or admin panel or ?

  4. developdesign
    Member
    Posted 1 year ago #

    I'm using a static front page. ( because I have a custom template for the front page.

    Should I create another CSS for the front page only?
    What would it be?
    body.home #branding img
    {
    background-image: url("http://website.com/wp-content/uploads/2011/04/image2.png");
    height: 460px;

  5. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Do you know the difference between external stylesheets and CSS that is inserted within the <head></head> sections of a page?

  6. alchymyth
    The Sweeper
    Posted 1 year ago #

    the header image of twenty ten is not a background image in the stylesheet, but a html image using the html img tag, and cannot be changed using css.

    if you assign a featured image for each page (dimensions larger than 940px*198px) this should be shown as the header image.

  7. developdesign
    Member
    Posted 1 year ago #

    Thanks for replying.

    Don't feature images require all the images to be the same as the default header image?

    I want the header image dimensions to be different for front page and inner site pages.

    It seemed that body class would have been a good solution, but not apparently not with twenty ten / options.

    here's the site: http://importeak.ca/importeak/

    I ended up hardcoding the header image into a 2nd header file ( but I still want to know how to resolve it properly )

Topic Closed

This topic has been closed to new replies.

About this Topic