Using the Twitter Bootstrap CSS framework, I have successfully created a custom navigation bar for desktop devices with a width of 1200 pixels and above. Now, I want to create similar navigation bars for other screen widths such as 980px, tablets, and phones. The issue I am facing is that even though I have used visible-desktop
, the navigation bar gets distorted when resizing the browser from 1200px to smaller sizes, although it remains visible.
<div id="navigation-div" class="span6 offset2">
<div id="navigation-nophone" class="visible-desktop">
<ul class="menu clearfix">
<li class="active"><a href="">Home</a></li>
<li><a href="">News</a></li>
<li><a href="">Demoes</a></li>
<li><a href="">Features</a></li>
<li><a href="">About</a></li>
<li><a href="">Contact</a></li>
</ul>
</div>
<div id="navigation-phone" class="visible-phone">
<ul class="menu">
<li class="active"><a href="">Home</a></li>
<li><a href="">News</a></li>
<li><a href="">Demoes</a></li>
<li><a href="">Features</a></li>
<li><a href="">About</a></li>
<li><a href="">Contact</a></li>
</ul>
</div>
</div>
It seems that when the window is resized to less than 1200px, the layout width changes to 980px but Bootstrap still considers it as a desktop view. I'm unsure how to resolve this issue.
While I can define new parameters for the 980px layout and the 1200px layout, I cannot figure out how to switch between them (since visible-desktop
applies to both cases).
P.S.
The navigation switch for phones is working correctly!