WordPress.org

Support

Support » Themes and Templates » how to center twentyeleven header image?

how to center twentyeleven header image?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Assign a div class to the image and modify your CSS to move the image to the center. You want to remove the complete white background? Where would you position the nav bar? You would still need some sort of background.

    Michael

    @alchymyth

    Forum Moderator

    the white is the background of the div with the css id #page. to have the header area outside/before the start of the #page div, to make it ransparent, would need quite complex changes to the html structure of the theme.

    @futurepocket @alchymyth thanks for your help, I can ignore the white background thing, it doesn’t look that bad, but I want to understand how to center the header image in twenty-eleven, I tried to put align center in #brandimage in styles.css but it failed, can you explain how I can do what you described:

    Assign a div class to the image and modify your CSS to move the image to the center.

    Thanks 🙂

    It would be easier to help if we could see your actual website/CSS. Try setting #brandimage to text-align: center, not align: center.

    @sixhours I tried both align Center and text align Center, both didn’t work for some reason, perhaps something special needed for twenty-eleven css?

    Align: center and text-align: center don’t work.. like I said, you will have to use margin-left to center the image because margin: auto doesn’t work in IE.

    Align: center and text-align: center don’t work.. like I said, you will have to use margin-left to center the image because margin: auto doesn’t work in IE.

    sorry, but I’m trying in my local host since yesterday for just centering this header image with no result, so can you please guide me how to do it exactly?

    Try changing the following:

    #branding hgroup {
    	margin: 0 auto;
    	text-align:center;
    }
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘how to center twentyeleven header image?’ is closed to new replies.
Skip to toolbar