Reputation: 47
I have a problem with my website:
http://avocat2.dac-proiect.ro/?page_id=17
The menu is not by the way ... if you go on the front page there is shown as it should.
This is my code:
<header id="masthead" class="navbar navbar-default" role="banner" style="
background: transparent;
">
<div class="container-fluid">
<?php if (is_home() || is_front_page()) { ?> <!-- PLACE THIS LINE ABOVE YOUR HEADER -->
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12" style="font-size:17px;">
<img src="wp-content/themes/WordPressBootstrap-master/images/DESPRE-NOI.png" class="img-responsive center-block">
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12" style="background-color:lavender;font-size:17px;display:none;">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<p> Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
</div>
</div>
<?php } ?> <!-- PLACE THIS CODE AFTER THE HEADER -->
<div class="container" style="
background: white;
width: 100%;
padding-top: 30px;
margin-top: 0px;
">
<nav class="" role="navigation">
<!-- <div class="container-fluid">-->
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-navbar-collapse-1">
<!-- <form class="navbar-form navbar-left" role="search">-->
<!-- <div class="form-group">-->
<!-- <input type="text" class="form-control" placeholder="Search">-->
<!-- </div>-->
<!-- <button type="submit" class="btn btn-default">Submit</button>-->
<!-- </form>-->
<a class="screen-reader-text skip-link" href="#content"><?php _e( 'Skip to content', 'zdwpbs' ); ?></a>
<?php
wp_nav_menu( array( 'theme_location' => 'primary' ,
'menu_class' => 'nav-menu') );
?>
</div><!-- /.navbar-collapse -->
<!-- </div>-->
<!-- /.container-fluid -->
</nav>
</div><!-- .container -->
</header>
I do not understand why it is not until the end ... can you help me please to solve this problem?
Thanks in advance!
Upvotes: 0
Views: 3353
Reputation: 1726
Thats because you've placed your menu inside .container-fluid div (in pages other than home) which has a padding of 15px
on the left and right sides. In the homepage menu is outside the container-fluid div. Thats why it's 100%.
You can either move menu outside the .container-fluid
div or you can add padding:0px;
to the .container-fluid
div
<div class="container-fluid no-padding">
//contents
</div>
.no-padding{padding:0px;}
Upvotes: 3