Seattle Electric Vehicle Association

SEVA Site

Hover over or click on sections of code to see annotations!

header nav { background:#e1edf2; width:100%; text-align:center; clear:both; } header ul { list-style:none; width:100%; max-width:980px; margin:0 auto; } header ul li { display:inline-block; position:relative; width:13%; } header nav ul a { display:inline-block; color:#66BACF; width:100%; line-height:2em; text-decoration:none; text-transform:lowercase; font-size:1.2em; font-weight:bold; } header nav ul a:hover { color:#D7E7EF; background:#66BACF; } This CSS is the basic styling applied to the main navigation bar and the navigation items.
header nav li ul { display:none; position:absolute; top:100%; background:#D7E7EF; width:150%; z-index:1; } header nav li:hover ul { display:block; } header nav li ul li { display:block; width:100% } This CSS provides the functionality and styling that creates the pure CSS dropdown menu.
@media screen and (max-width:600px) { header nav ul li { width:100%; } header nav li { display:block; } header nav li ul { width:100%; } header nav li:hover ul { display:none; } } This CSS provides the styling for the navigation and the submenus when the viewport size is smaller, as in the case of tablet and phone views.