Title: How to decrease space between nav-menu and the sidebars and page?
Last modified: August 21, 2016

---

# How to decrease space between nav-menu and the sidebars and page?

 *  [Kashyap](https://wordpress.org/support/users/pixelpluck/)
 * (@pixelpluck)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/)
 * hi
    my website is [pixelpluck.com](http://pixelpluck.com) There is **space between
   the nav-menu and the sidebars** and page itself. This doesn’t look aesthetically
   pleasing. Please tell me **which file and where exactly do i edit to what value
   to remove that blank space**. regards and thanks

Viewing 15 replies - 1 through 15 (of 33 total)

1 [2](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/page/2/?output_format=md)

 *  [Aaron "The Monkey" Leal](https://wordpress.org/support/users/aaronaleal96/)
 * (@aaronaleal96)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988300)
 * Hi Pixel,
    This was an interesting code for your theme. I found out the issue.
   The reason that the spaces are here is because of google add. This is a space
   so you can add ads for all of them. The solution I found would be removing it.
 * The line(s) of code would be titled:
    `<div id="ads"></div>`
 * If you do remove those it we delete the whole space.
 * Cheers Aaron.
 *  [Aaron "The Monkey" Leal](https://wordpress.org/support/users/aaronaleal96/)
 * (@aaronaleal96)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988301)
 * Hi Pixel,
    The whole line of code to remove would would be:
 *     ```
       <div id="ads">
       <center>
       <script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
       <!-- head horizontal long -->
       <ins class="adsbygoogle" style="display:inline-block;width:468px;height:60px" data-ad-client="ca-pub-4363329159120989" data-ad-slot="1280200550" data-adsbygoogle-status="done"><ins style="display:inline-table;border:none;height:60px;margin:0;padding:0;position:relative;visibility:visible;width:468px;background-color:transparent"><ins id="aswift_0_anchor" style="display:block;border:none;height:60px;margin:0;padding:0;position:relative;visibility:visible;width:468px;background-color:transparent"><iframe width="468" height="60" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;"></iframe></ins></ins></ins>
       <script>
       (adsbygoogle = window.adsbygoogle || []).push({});
       </script>
       </center>
       </div>
       ```
   
 * Cheers, Aaron.
 *  Thread Starter [Kashyap](https://wordpress.org/support/users/pixelpluck/)
 * (@pixelpluck)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988376)
 * fantastic. Thank You very much. Another quick question.
    How to insert a google
   ad banner in the big empty space on head of website, after logo. Thank you again.
   You are awesome 🙂
 *  [Aaron "The Monkey" Leal](https://wordpress.org/support/users/aaronaleal96/)
 * (@aaronaleal96)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988379)
 * Hi Pixel,
    We do this sort of stuff all the time!
 * So to insert the google ad banner on the top right of the header you would have
   to insert this line of code:
 * In the Header section of the code, It would be right after “Site Description”
 *     ```
       <div id="ads" style="
           padding-top: 10px;
       ">
       <center>
       <script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
       <!-- head horizontal long -->
       <ins class="adsbygoogle" style="display:inline-block;width:468px;height:60px" data-ad-client="ca-pub-4363329159120989" data-ad-slot="1280200550" data-adsbygoogle-status="done"><ins style="display:inline-table;border:none;height:60px;margin:0;padding:0;position:relative;visibility:visible;width:468px;background-color:transparent"><ins id="aswift_0_anchor" style="display:block;border:none;height:60px;margin:0;padding:0;position:relative;visibility:visible;width:468px;background-color:transparent"><iframe width="468" height="60" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;"></iframe></ins></ins></ins>
       <script>
       (adsbygoogle = window.adsbygoogle || []).push({});
       </script>
       </center>
       </div>
       ```
   
 * I also took the liberty to center it out ;-)!
    Please don’t hesitate to ask for
   any more help!
 * Cheers, Aaron
 *  Thread Starter [Kashyap](https://wordpress.org/support/users/pixelpluck/)
 * (@pixelpluck)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988409)
 *     ```
       <!DOCTYPE html>
       <html class="no-js" <?php language_attributes(); ?>>
   
       <head>
       	<meta charset="<?php bloginfo('charset'); ?>">
       	<meta name="viewport" content="width=device-width, initial-scale=1.0">
   
       	<title><?php wp_title(''); ?></title>
   
       	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
   
       	<?php wp_head(); ?>
       </head>
   
       <body <?php body_class(); ?>>
   
       <div id="wrapper">
   
       	<header id="header">
   
       		<?php if (has_nav_menu('topbar')): ?>
       			<nav class="nav-container group" id="nav-topbar">
       				<div class="nav-toggle"><i class="fa fa-bars"></i></div>
       				<div class="nav-text"><!-- put your mobile menu text here --></div>
       				<div class="nav-wrap container"><?php wp_nav_menu(array('theme_location'=>'topbar','menu_class'=>'nav container-inner group','container'=>'','menu_id' => '','fallback_cb'=> false)); ?></div>
   
       				<div class="container">
       					<div class="container-inner">
       						<div class="toggle-search"><i class="fa fa-search"></i></div>
       						<div class="search-expand">
       							<div class="search-expand-inner">
       								<?php get_search_form(); ?>
       							</div>
       						</div>
       					</div><!--/.container-inner-->
       				</div><!--/.container-->
   
       			</nav><!--/#nav-topbar-->
       		<?php endif; ?>
   
       		<div class="container group">
       			<div class="container-inner">
   
       				<div class="group pad">
       					<?php echo alx_site_title(); ?>
       					<?php if ( ot_get_option('site-description') != 'off' ): ?><p class="site-description"><?php bloginfo( 'description' ); ?></p><?php endif; ?>
       				</div>
   
       				<?php if (has_nav_menu('header')): ?>
       					<nav class="nav-container group" id="nav-header">
       						<div class="nav-toggle"><i class="fa fa-bars"></i></div>
       						<div class="nav-text"><!-- put your mobile menu text here --></div>
       						<div class="nav-wrap container"><?php wp_nav_menu(array('theme_location'=>'header','menu_class'=>'nav container-inner group','container'=>'','menu_id' => '','fallback_cb'=> false)); ?></div>
       					</nav><!--/#nav-header-->
       				<?php endif; ?>
   
       			</div><!--/.container-inner-->
       </div><!--/.container-->
   
       	</header><!--/#header-->
   
       	<div class="container" id="page">
       		<div class="container-inner">
       			<div class="main">
       				<div class="main-inner group">
       <div id="ads">
       <center>
       <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
       <!-- head horizontal long -->
       <ins class="adsbygoogle"
            style="display:inline-block;width:468px;height:60px"
            data-ad-client="ca-pub-4363329159120989"
            data-ad-slot="1280200550"></ins>
       <script>
       (adsbygoogle = window.adsbygoogle || []).push({});
       </script>
       </center>
       </div>
       ```
   
 *  Thread Starter [Kashyap](https://wordpress.org/support/users/pixelpluck/)
 * (@pixelpluck)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988410)
 * Where exactly do i need to insert ad for header.. and looks like i tried before
   by adding below.. so should i remove that ??
 *  Thread Starter [Kashyap](https://wordpress.org/support/users/pixelpluck/)
 * (@pixelpluck)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988411)
 * i want to insert this ad
 *     ```
       <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
       <!-- Head of Page -->
       <ins class="adsbygoogle"
            style="display:inline-block;width:728px;height:90px"
            data-ad-client="ca-pub-4363329159120989"
            data-ad-slot="2164517757"></ins>
       <script>
       (adsbygoogle = window.adsbygoogle || []).push({});
       </script>
       ```
   
 *  [scripkeeper](https://wordpress.org/support/users/scripkeeper/)
 * (@scripkeeper)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988497)
 * I was editing in the hueman theme widget area and I noticed the width of the 
   sidebars no longer match and the site looks pulled to left [ I can’t figure out how to fix this. Any ideas?](http://www.defcongravity.com)
 * Thanks
 *  [Aaron "The Monkey" Leal](https://wordpress.org/support/users/aaronaleal96/)
 * (@aaronaleal96)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988527)
 * Hey Scripkeeper,
    Do you have a working website/URL? I will be happy to assist
   you.
 * Thanks, Aaron.
 * Hi Pixel,
 * I am sorry I have not gotten back to you. Do you still need the assistance?
 * Thanks, Aaron.
 *  [scripkeeper](https://wordpress.org/support/users/scripkeeper/)
 * (@scripkeeper)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988529)
 * Hey what’s up Aaron,
 * Yes, [http://www.defcongravity.com](http://www.defcongravity.com)
 * Thanks!
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988530)
 * **[@aaron](https://wordpress.org/support/users/aaron/) “The Monkey” Leal**: Thank
   you contributing to the forums but please do not encourage people to edit theme
   files directly. At best, they will lose all of their changes when they update
   the theme. At worst, they could bring their site down. They should be recommended
   to create a [child theme](http://codex.wordpress.org/Child_Themes) or use a [custom CSS plugin](http://wordpress.org/extend/plugins/search.php?q=custom+css)
   for their changes.
 *  [Aaron "The Monkey" Leal](https://wordpress.org/support/users/aaronaleal96/)
 * (@aaronaleal96)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988531)
 * Yes esmi,
    I understand this. I was going to tell Pixel to do this now, without
   reply. I will begin letting people know that a child them or the plug in should
   be used. Yes it is one of the best ideas to use for a custom edit themselves.
   Thanks Again esmi.
 *  [scripkeeper](https://wordpress.org/support/users/scripkeeper/)
 * (@scripkeeper)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988532)
 * Hi Aaron,
    Have you figured out what went wrong with the site?
 * Thanks again,
 * [http://www.defcongravity.com](http://www.defcongravity.com)
 *  [Aaron "The Monkey" Leal](https://wordpress.org/support/users/aaronaleal96/)
 * (@aaronaleal96)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988533)
 * Do you think you can add a widget or create something that caused the issue? 
   I cannot see what is causing the problem without it being simulated. But I do
   think it is a simple padding issue:-) though.
 * Thanks, Aaron.
 *  [scripkeeper](https://wordpress.org/support/users/scripkeeper/)
 * (@scripkeeper)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/#post-4988535)
 * I’m sure it was something I did while messing with the sidebar widgets. And I
   agree, I think it’s a padding issue. But what can I do to check? what piece of
   code can I put in there to find out for sure.

Viewing 15 replies - 1 through 15 (of 33 total)

1 [2](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/page/2/?output_format=md)

The topic ‘How to decrease space between nav-menu and the sidebars and page?’ is
closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/hueman/3.7.27/screenshot.png)
 * Hueman
 * [Support Threads](https://wordpress.org/support/theme/hueman/)
 * [Active Topics](https://wordpress.org/support/theme/hueman/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/hueman/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/hueman/reviews/)

## Tags

 * [blank space](https://wordpress.org/support/topic-tag/blank-space/)
 * [nav menu](https://wordpress.org/support/topic-tag/nav-menu/)
 * [Removing](https://wordpress.org/support/topic-tag/removing/)
 * [sidebar](https://wordpress.org/support/topic-tag/sidebar/)

 * 33 replies
 * 4 participants
 * Last reply from: [Aaron "The Monkey" Leal](https://wordpress.org/support/users/aaronaleal96/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/how-to-decrease-space-between-nav-menu-and-the-sidebars-and-page/page/3/#post-4988561)
 * Status: not resolved