WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
blank space under nav bar (7 posts)

  1. mbam7
    Member
    Posted 1 year ago #

    Hi, I'm new to this and have been trying to clear the space under the nav bar (where it is also repeating the name of the page e.g. "HOME"). My site: bristolprivatetutor.co.uk. I don't want a gap under the menu nav bar (is that the correct terminology?). I've looked at the code, but in all honestly did not really know what I was doing! Thanks for taking the time.

    http://wordpress.org/extend/themes/twentytwelve/

  2. Might removing the title in the page edit form work for you?

  3. mbam7
    Member
    Posted 1 year ago #

    Hi Konstantin. If you do that then the title of the page is not displayed but the blank space remains. My aim is to remove the space from all of the pages on my website. The other problem is that if you remove the title from all of the pages then they would all have no title.

  4. Ov3rfly
    Member
    Posted 1 year ago #

    In your file "style.css" locate this:

    .site-header {
        padding: 1.71429rem 0;
    }

    Replace with this:

    .site-header {
        padding: 1.71429rem 0 0 0;
    }

    This should be close enough. If you want even less space, additionally locate this:

    .site-content {
        margin: 1.71429rem 0 0;
    }

    Replace the 1.71429rem with a smaller value like 1rem or 10px or even less like this:

    .site-content {
        margin: 1rem 0 0;
    }
  5. mbam7
    Member
    Posted 1 year ago #

    Ov3rfly - thanks for reply
    The code in the style.css looks like this

    /* Header */
    .site-header {
    	padding: 24px 0;
    	padding: 1.714285714rem 0;

    I did not touch the first line (padding: 24px 0;). I changed padding: 1.714285714rem 0; to padding: 1.71429rem 0 0 0; but it didn't do the trick!

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    Make sure you don't update your theme until you transfer changes made into a Child Theme, otherwise you'll lose your changes.

    This is a reason why editing themes' (not custom built) files is discouraged.

  7. adrianhoward
    Member
    Posted 1 year ago #

    With the usual caveat about setting up a child theme - you should find that the following will remove the background at the top:

    html, body .site {
        margin-top: 0px
    }

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic