Support » Theme: Twenty Twelve » Increase top margin to show background image

  • Resolved lii71


    Just started working on a new site using twentytwelve (with some experience with twentyeleven, but with very little css and other tweaks).

    First problem: I’d like to use the background image in a header-like way, that is, show a significant part of the image above the main page content. I created a child theme and thought it would be a piece of cake to increase the top margin in the child theme’s style.css, but apparently not… I did manage to get rid of the top margin using this:

    body .site {
        margin-top: 0;

    but not increase it with a larger value. Any tips?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Andrew Nevins


    What did you try to increase the top margin?

    Put bigger values instead of 0… but without a unit. So thanks – just because you asked, I tested with a “fresh brain” and got exactly what I wanted with value 140px (instead of just 140, which – I guess? – reverted back to the default margin).

    Moderator Andrew Nevins


    Yes, you just hadn’t specified a measurement like pixels (px).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Increase top margin to show background image’ is closed to new replies.