Team:TU Eindhoven/Template:NavPanel
From 2014.igem.org
(Difference between revisions)
Line 70: | Line 70: | ||
#nav li:hover ul li a:hover{ /* Here we define the most explicit hover states--what happens when you hover each individual link. */ | #nav li:hover ul li a:hover{ /* Here we define the most explicit hover states--what happens when you hover each individual link. */ | ||
background:#333; | background:#333; | ||
+ | z-index: 40; | ||
+ | } | ||
#nav ul{ | #nav ul{ | ||
Line 77: | Line 79: | ||
position:absolute; | position:absolute; | ||
left:-9999px; /* Hide off-screen when not needed (this is more accessible than display:none;) */ | left:-9999px; /* Hide off-screen when not needed (this is more accessible than display:none;) */ | ||
+ | z-index: 40; | ||
} | } | ||
Line 82: | Line 85: | ||
padding-top:1px; /* Introducing a padding between the li and the a give the illusion spaced items */ | padding-top:1px; /* Introducing a padding between the li and the a give the illusion spaced items */ | ||
float:none; | float:none; | ||
+ | z-index: 40; | ||
} | } | ||
#nav ul a{ | #nav ul a{ | ||
white-space:nowrap; /* Stop text wrapping and creating multi-line dropdown items */ | white-space:nowrap; /* Stop text wrapping and creating multi-line dropdown items */ | ||
+ | z-index: 40; | ||
} | } | ||
#nav li:hover ul{ /* Display the dropdown on hover */ | #nav li:hover ul{ /* Display the dropdown on hover */ | ||
left:0; /* Bring back on-screen when needed */ | left:0; /* Bring back on-screen when needed */ | ||
+ | z-index: 40; | ||
} | } | ||
Line 93: | Line 99: | ||
background:#6b0c36; | background:#6b0c36; | ||
text-decoration:underline; | text-decoration:underline; | ||
+ | z-index: 40; | ||
} | } | ||
#nav li:hover ul a{ /* The persistent hover state does however create a global style for links even before they're hovered. Here we undo these effects. */ | #nav li:hover ul a{ /* The persistent hover state does however create a global style for links even before they're hovered. Here we undo these effects. */ |
Revision as of 11:55, 4 August 2014