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 trial
Gina Schweizer
Front End Web Development Techdegree Student 10,721 PointsHow do I get the navigation in the Header AND Footer of Tablet and Mobile responsive site?
I am having THE hardest time using the mobile first approach for the navigation menus. I need to have the navigation in the header and footer of the tablet and desktop design but NOT the mobile design. How can I do this without adding the navigation to the footer in the HTML?
2 Answers
Erik Nuber
20,629 PointsUse media queries to build at set points. If you don't want something to appear you can use CSS.
ex.
#mobileNav {
display : none;
}
As you are looking for nav in a bigger screen size,
@media screen and (min-width: 480px) {
#mobileNav {
display: None;
}
#footerNav {
styles here
}
#mainNav {
styles here
}
}
@media screen and (min-width: 850px) {
#mainNav, #footerNav {
styles here if they will change
}
}
these are just random set points, you can change them however best suits your need, I just made the numbers up for the example
Gina Schweizer
Front End Web Development Techdegree Student 10,721 PointsThank so much! That helped!
Harry James
14,780 PointsHarry James
14,780 PointsGreat answer Erik Nuber! +1
Also Gina Schweizer - if Erik's answer helped, go ahead and mark it as the Best Answer to credit him and let other users know that this question has been answered :)