Dropdown navs

Hey Class,

So one problem we identified in the last class was getting our sub-menu to stay active when we hover over the links – some of you noticed that if we exit the hover-state of the button in our primary navigation, the sub-nav disappears.  Well, if we coded this correctly, it shouldn’t have that problem:

.mainNav li:hover ul {

	}

If it still doesn’t work, there’s a fix, of course:

http://www.craigmdennis.com/articles/pure-css-drop-down-menu-with-persistent-active-state
It should be noted that if you having spacing between the buttons of your sub-nav, that’ll also screw up the hover effect.  So keep them close together! Padding is fine, but margins cause problems.

On Wednesday, we’ll continue to explore navs, including one-page scrolling and some really basic parallax stuff.  A rubric for the nav assignment is forthcoming.

 

 

This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post. Both comments and trackbacks are currently closed.