Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKelvin Atawura
Front End Web Development Techdegree Student 19,022 Pointshow to get zurb foundations hamburger menu/topbar to appear only on only on small devices
l am creating a menu using foundation. l have only achieve all the transitions and designs l want with sass. But l want the navigation to appear like the hamburger one on small devices or an off canvas one. Add the top bar nav ends me with this ugly black background. is there any way l can customize this for the best of my use or get it to appear only on small devices. the html code for my nav bar is bellow
<header>
<article class="row">
<aside class="large-6 columns">
<h1 class="title-area icons-logo left ip-inner"><a href="#">Pan.a.cea</a></h1>
</aside>
<aside class="large-6 columns">
<nav class="top-bar" data-topbar role="navigation">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Our Services</a></li>
<li><a href="#">Our Portfolio</a></li>
<li><a href="#">News</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</nav>
</aside>
</article>
</header>
1 Answer
Ali M Malik
33,293 PointsYou can use the visibility classes to show or hide content depending on the screen size
<p class="panel">
<strong class="show-for-small-only">This text is shown only on a small screen.</strong>
<strong class="show-for-medium-up">This text is shown on medium screens and up.</strong>
<strong class="show-for-medium-only">This text is shown only on a medium screen.</strong>
<strong class="show-for-large-up">This text is shown on large screens and up.</strong>
<strong class="show-for-large-only">This text is shown only on a large screen.</strong>
<strong class="show-for-xlarge-up">This text is shown on xlarge screens and up.</strong>
<strong class="show-for-xlarge-only">This text is shown only on an xlarge screen.</strong>
<strong class="show-for-xxlarge-up">This text is shown on xxlarge screens and up.</strong>
</p>
hope this helps
Kelvin Atawura
Front End Web Development Techdegree Student 19,022 PointsKelvin Atawura
Front End Web Development Techdegree Student 19,022 Pointsl have seen these utility classes but using them would mean having two navs wont it? so show one without the class topbar and the other with a class topbar.
Ali M Malik
33,293 PointsAli M Malik
33,293 PointsYes taking this approach would mean you have to create and maintain two navs. Now if you like you can generate the the nav links with JavaScript which means you don't have to add links in two places in your html. This helps with keeping up two different interactions.