I am having issues trying to get a Bootstrap 3 footer navigation to underlay correctly on a SharePoint 2013 Intranet site.
This is what I am seeing: http://screencast.com/t/vQFVCBbfE7P
In the Developer Tools, I have attempted to move the z-index down to 0 for the footer navigation itself (which that part works in part, i.e. the grey background is not floating over the popup divs)
My relevant CSS is
.footerTagline {
background: #001F5B;
color: white;
padding: 2px 0px;
}
#bs-footer-nav ul li ul li {
margin-left: -40px;
}
.BHIFooterInfo, .BHIFooterInfo div {
z-index:0;
position:inherit !important;
background: rgb(138,141,143);
}
.BHIFooterInfo, #companySites {
padding-top: 10px;
padding-bottom: 20px;
}
#bs-footer-nav li {
color: rgb(241, 180, 52);
padding-right: 35px;
}
#bs-footer-nav li ul li {
color: rgb(241, 180, 52);
padding-right: 0px;
}
#bs-footer-nav, #bs-footer-nav a {
background: rgb(138, 141, 143);
color: #fff;
}
.navbar {
margin-bottom: 0px;
}
.footerSocialImages {
width:23px;
height: 23px;
}
#bhiSocialLinks li, #bhiSocialLinks li a {
padding-left: 0px;
padding-right: 2px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<nav class="navbar navbar-default BHIFooterInfo">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-footer-nav" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Footer Navigation</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse nav-footer" id="bs-footer-nav">
<ul class="nav navbar-nav">
<li>Company Information
<ul>
<li><a href="linkurl.com">Goals and Initiatives</a></li>
<li><a href="linkurl.com">BISSELL Locations</a></li>
<li><a href="linkurl.com">BISSELL Strategy</a></li>
<li><a href="linkurl.com">Corporate Calendar</a></li>
<li><a href="linkurl.com">Engagement Survey</a></li>
<li><a href="linkurl.com">Global Business Update</a></li>
<li><a href="linkurl.com">MTD Sales</a></li>
<li><a href="linkurl.com">Organizational Chart</a></li>
<li><a href="linkurl.com">Press Releases</a></li>
</ul>
</li>
<li>Global BISSELL Sites
<ul>
<li><a href="http://www.bissell.com.au" target="_blank">Australia</a></li>
<li><a href="http://canada.bissell.com" target="_blank">Canada</a></li>
<li><a href="http://www.bissell.cn" target="_blank">China</a></li>
<li><a href="http://www.bissell.cn" target="_blank">Hong Kong</a></li>
<li><a href="http://www.bissell.nl" target="_blank">Netherlands</a></li>
<li><a href="http://www.bisselldirect.co.uk" target="_blank">United Kingdom</a></li>
<li><a href="http://www.bissell.com" target="_blank">United States</a></li>
</ul>
</li>
<li>Quick Links
<ul>
<li><a href="linkurl.com">Associate Take Home Program</a></li>
<li><a href="linkurl.com">BISSELL Outlet Store</a></li>
<li><a href="linkurl.com" target="_blank">Idea Hopper</a></li>
<li><a href="linkurl.com" target="_blank">Guest Registration </a></li>
<li><a href="http://linkurl.com">Meeting Services</a></li>
<li><a href="http://linkurl.com/" target="_blank">Partner Site</a></li>
<li><a href="http://linkurl.com/" target="_blank">Supplier Site</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" id="bhiSocialLinks">
<li><a href="https://www.facebook.com/bissell" target="_blank"><img src="/Style Library/Images/socialMedia Links/Facebook_white.png" class="footerSocialImages" alt="Facebook"></a></li>
<li><a href="https://www.instagram.com/bissellclean/" target="_blank"><img src="/Style Library/Images/socialMedia Links/Instagram_white.png" class="footerSocialImages" alt="Instagram"></a></li>
<li><a href="https://twitter.com/bissellclean" target="_blank"><img src="/Style Library/Images/socialMedia Links/Twitter_white.png" class="footerSocialImages" alt="Twitter"></a></li>
<li><a href="https://www.youtube.com/user/BISSELLClean" target="_blank"><img src="/Style Library/Images/socialMedia Links/YouTube_white.png" class="footerSocialImages" alt="YouTube"></a></li>
<li><a href="https://www.linkedin.com/company/bissell-homecare-inc-" target="_blank"><img src="/Style Library/Images/socialMedia Links/LinkedIn_white.png" class="footerSocialImages" alt="LinkedIn"></a></li>
<li><a href="https://www.glassdoor.com/Overview/Working-at-BISSELL-EI_IE5594.11,18.htm" target="_blank"><img src="/Style Library/Images/socialMedia Links/GlassDoor_white.png" class="footerSocialImages" alt="Glass Door"></a></li>
<li><a href="https://www.pinterest.com/bissellclean/" target="_blank"><img src="/Style Library/Images/socialMedia Links/Pinterest_white.png" class="footerSocialImages" alt="Pinterest"></a></li>
<li><a href="https://plus.google.com/+bissell" target="_blank"><img src="/Style Library/Images/socialMedia Links/Google+_white.png" class="footerSocialImages" alt="Google+"></a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
</div>
</div>
</div>
Even using !important on the z-index:0 all the way down to the a tag appears to not help.
This issue appears in all browsers.
Things to note on this are:
- The Divs appear to be generated by MS code in JavaScript (for all Div Popup creations)
- It overlays anything in the footer nav that is in the ul or li or a
I realize I am missing something simple, but CSS is not my strong point. Any help is humbly appreciated.
Thanks
2
Answers
I feel like an idiot now. This is what ended up fixing it:
While that in and of itself is not helpful, it translates to:
when it all cascades out.
Edit for Clarity
The containing div had a position:inherit on it. I am uncertain if Bootstrap had a position:relative on their navigation items or not. When i was playing with the z-index again, as indicated in the suggestions, those were not making any difference, even setting them to negative values (with the exception of hiding all the links). When I accidentally clicked off the position:inherit, the links fell under the pop-up divs.
So, I added the same logic to the List Items that was on the footer div. Once I tested it out, it ended up working. I looked at the computed CSS, and it turns out that it inherited the static value (I don't know why it needed to be explicitly stated). Per w3Schools, static
So I am guessing that it just reset everything in the footer to display as it appeared in the code. So, the z-index ended up not being the issue, as I was thinking.
add the following code or give me the hosted url to check