I am beginner in JS.
I found wonderful example of responsive menu, and put code inside functions.php. Menu must works like here http://filamentgroup.com/examples/rwd-nav-patterns/ but i have the bug – dropdown menu shift to the right in my site when I use tablet mode.
I tried to include this menu in my site, based on Bootstrap http://b.pusku.com
UPDATE:
Part of the problem with the fiddle was that the space allotted for the logo image was too wide, so I added the following to correct that:
To get the dropdown to float left at all times, add:
to the
@media screen and (min-width: 910px)rule…Once the navigation links collapse to a dropdown, they’ll float left. The links will have an offset of
25pxon the left because of the following rule inbootstrap.css(on line 728):You can override that, if you like, by adding
margin-left: 0;to the.nav-primary ulrule:Finally, as the screen width narrows, the dropdown’s width seems to stretch the entire width. If this is not a desired effect, add
display: inline-block;to the.nav-primaryrule:I’ve also re-written the javascript that makes the “responsive” navigation collapse to a dropdown using more (appropriately named) variables so you may better understand why the script does what it does:
Here’s an updated fiddle demonstrating the basics: http://jsfiddle.net/DD7MC/1/
I did not override either the
margin-leftor thedisplayin the updated fiddle.ORIGINAL:
I think it’s a CSS conflict between
rwd-nav.cssandbootstrap.css. Try changing the class definition for.nav-menu .nav-primary h3inrwd-nav.cssto:Also, your hosting provider is returning a 404 for
url(img/icons.png). You may want to make sure that file exists.