WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
[resolved] Can't change HTML element marked !important (10 posts)

  1. markcorder
    Member
    Posted 1 year ago #

    This has got me stumped : I have a child-theme of Twenty Twelve and the CSS edits I make there work fine, but I'm trying to get rid of (or at least reduce) some of the space "up top" - above the main body.

    Inspecting the element in Chrome, I see that HTML has margin-top set to 28px and marked !important. Of course I can't override !important - so I thought I'd just remove it from the original Twenty Twelve style.css file ... but it's nowhere to be found! I've looked in every CSS file Twenty Twelve has - but none of them contain anything like this margin-top: 28px declaration, !important or not. In fact, I can't even find "28px" anywhere in it!

    It also seems the HTML element is within an IF statement that checks for older versions of IE...

    Where on earth (or in the code) is this HTML margin-top: 28px declaration coming from?

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    You can override importants. Can you link the webpage in question?

  3. markcorder
    Member
    Posted 1 year ago #

    It's a "demo" I'm volunteering to make for a friend (not ready for the public - and will be installed on their own domain when it's finished) :

    http://markcorder.com/wordpress-demo/

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    The space below the "You're here: Home" message but above the first double border http://awesomescreenshot.com/04auoy9cc ?

  5. markcorder
    Member
    Posted 1 year ago #

    No - at the very top of the page : That mottled-purple background. I'd like for the body of the site to be flush with the top and no background showing above it...

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    Chrome's developer tools shows where the space derives from [screenshot].
    Remember, orange represents margin, green represents padding.

    You ought to override this in your Child Theme stylesheet.

  7. markcorder
    Member
    Posted 1 year ago #

    Thanks! - I missed that .site class of the body ... the HTML declaration threw me!

    I'll consider this one resolved - and thanks again for the quick help!

  8. Andrew
    Forum Moderator
    Posted 1 year ago #

    By the way, the margin top of 28 pixels made !important was probably styles for an administrator panel at the top of your page, in which case needn't be touched.

  9. markcorder
    Member
    Posted 1 year ago #

    Yeah, I was wondering since it was nowhere to be found in the Theme's CSS files and figured it must be coming from a plugin...

  10. alchymyth
    Forum Moderator
    Posted 1 year ago #

    the admin bar is a WordPress build-in feature;

    you can deactivate it from:

    dashboard - users - your profile: Toolbar [ ] Show Toolbar when viewing site

    http://codex.wordpress.org/Administration_Screens#Toolbar

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic