User:SvenB/DropTest
From 2014.igem.org
(Difference between revisions)
Line 2: | Line 2: | ||
<head> | <head> | ||
<meta charset="utf-8"> | <meta charset="utf-8"> | ||
- | <title>CSS3 Dropdown Menu von designyourweb | + | <title>CSS3 Dropdown Menu von designyourweb</title> |
<style> | <style> | ||
+ | nav { | ||
+ | width: 960px; | ||
+ | } | ||
nav ul { | nav ul { | ||
padding: 0px; | padding: 0px; | ||
margin: 0px; | margin: 0px; | ||
- | |||
- | |||
} | } | ||
- | + | nav ul:after { | |
- | nav ul li { | + | clear: both; |
- | list-style: none; | + | content: " "; |
+ | display: block; | ||
+ | font-size: 0; | ||
+ | height: 0; | ||
+ | visibility: hidden; | ||
+ | } | ||
+ | nav ul,nav ul li{ | ||
+ | background-color: #FAFAFA; | ||
+ | } | ||
+ | nav ul li { | ||
+ | list-style: none; | ||
float:left; | float:left; | ||
- | |||
} | } | ||
- | |||
nav ul li a { | nav ul li a { | ||
text-decoration: none; | text-decoration: none; | ||
Line 22: | Line 31: | ||
color: #333; | color: #333; | ||
padding: 14px 34px 14px 34px; | padding: 14px 34px 14px 34px; | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
} | } | ||
- | + | nav ul li:hover > ul { | |
- | nav ul li | + | visibility: visible; |
- | + | ||
} | } | ||
- | + | nav ul li ul{ | |
- | nav ul li | + | display: inline; |
- | + | visibility: hidden; | |
+ | position: absolute; | ||
+ | padding:0px; | ||
} | } | ||
- | + | nav ul li ul li{ | |
- | nav ul li ul li | + | float: none; |
- | + | ||
} | } | ||
- | |||
nav ul li ul li a:hover{ | nav ul li ul li a:hover{ | ||
color: #333; | color: #333; | ||
- | |||
} | } | ||
Revision as of 15:48, 5 October 2014