WordPress.org

Forums

Change top margin in Twenty Twelve theme (3 posts)

  1. kirstybash
    Member
    Posted 2 years ago #

    Hi

    I am new to WordPress. I am trying to make a quick change to the Twenty Twelve template (I do not have a child template set up). When I view the source code and use the console I can see it is the piece of code below causing the margin and I want to change this but cannot find where to do it.

    Any help would be much appreciated.
    Thanks, Kirsty

    <style type="text/css" media="screen">
    html { margin-top: 28px !important; }
    * html body { margin-top: 28px !important; }
    </style>

  2. alchymyth
    Forum Moderator
    Posted 2 years ago #

    that code section is from the adminbar which you can control under dashboard - users - your profile - 'Toolbar [ ] Show Toolbar when viewing site'

    if you mean the gap at the top of the theme, then this is set here as a top margin, near the end of style.css:

    body .site {
    		padding: 0 40px;
    		padding: 0 2.857142857rem;
    		margin-top: 48px;
    		margin-top: 3.428571429rem;
    		margin-bottom: 48px;
    		margin-bottom: 3.428571429rem;
    		box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);
    	}
  3. kirstybash
    Member
    Posted 2 years ago #

    Thanks for your help!

Topic Closed

This topic has been closed to new replies.

About this Topic