How to decrease space between nav-menu and the sidebars and page?
-
hi
my website is 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
-
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.
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.
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 🙂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
<!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>
Where exactly do i need to insert ad for header.. and looks like i tried before by adding below.. so should i remove that ??
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>
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?
Thanks
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.
@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 or use a custom CSS plugin for their changes.
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.Hi Aaron,
Have you figured out what went wrong with the site?Thanks again,
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.
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.
- The topic ‘How to decrease space between nav-menu and the sidebars and page?’ is closed to new replies.