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!
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
Alex Weinberg
2,726 PointsRemove fragment in url with media queries?
So I'm using a fragment id for my dropdown nav for mobile viewing. What happens is when I leave the nav dropdown extended, and then widen the viewport, the nav then gets messed up because of the #main-nav fragment in the url. Any way to get rid of this with a media query?
1 Answer

Craig Watson
Courses Plus Student 27,150 PointsHi Alex,
What do you mean by a fragment id in the URL :S
I made a simple responsive nav for a another member of treehouse a couple of days ago on codepen(link below) that your more than welcome to use.
Simple but really affective responsive nav
This is a nav I spent a long time creating so it was robust and well coded, tried and tested many times no issues! If your using just CSS be sure to get the compressed version of the CSS section of the pen as I used Sass to build it :)
Craig