From 2012hs.igem.org
(Difference between revisions)
|
|
Line 107: |
Line 107: |
| padding:0 20px; | | padding:0 20px; |
| } | | } |
- |
| |
- | /*--- DROPDOWN ---*/
| |
- | #navbar
| |
- |
| |
- | ul.navbar
| |
- | {
| |
- | background:#fffff;
| |
- | background:rgba(255,255,255,0);
| |
- | list-style:none;
| |
- | position:absolute;
| |
- | left:-9999px;
| |
- | }
| |
- |
| |
- | ul.navbar li
| |
- | {
| |
- | padding-top:1px;
| |
- | float:none;
| |
- | }
| |
- |
| |
- | ul.navbar a
| |
- | {
| |
- | white-space:nowrap; /* Stop text wrapping and creating multi-line dropdown items */
| |
- | }
| |
- |
| |
- | ul.navbar li:hover ul
| |
- | { /* Display the dropdown on hover */
| |
- | left:0; /* Bring back on-screen when needed */
| |
- | }
| |
- | ul.navbar li:hover a
| |
- | { /* These create persistent hover states, meaning the top-most link stays 'hovered' even when your cursor has moved down the list. */
| |
- | background:#A3ABAE;
| |
- | text-decoration:underline;
| |
- | }
| |
- |
| |
- | ul.navbar 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. */
| |
- | text-decoration:none;
| |
- | }
| |
- |
| |
- | ul.navbar li:hover ul li a:hover{ /* Here we define the most explicit hover states--what happens when you hover each individual link. */
| |
- | background:#333;
| |
- | }
| |
- |
| |
| | | |
| </style> | | </style> |
Revision as of 03:18, 28 March 2012