WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
[resolved] Increase top margin to show background image (4 posts)

  1. lii71
    Member
    Posted 1 year ago #

    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?

  2. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

    What did you try to increase the top margin?

  3. lii71
    Member
    Posted 1 year ago #

    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).

  4. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.