aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-03-12 22:49:06 +0100
committerJoris Guyonvarch2015-03-12 22:49:06 +0100
commitd810c37b68693e66a7e2ee3c9377c1906b5a2ae8 (patch)
tree4b67e919f52e3ffca56e44cc5168fba56ce0d395
parent76c4cfa004ea17e6ad9596fdcb1267d852e23da3 (diff)
Adding color transition on menu links
-rw-r--r--menu.css72
1 files changed, 34 insertions, 38 deletions
diff --git a/menu.css b/menu.css
index 51d777c..972629d 100644
--- a/menu.css
+++ b/menu.css
@@ -1,39 +1,18 @@
nav {
position: relative;
+ font-family: NothingYouCouldSay;
+ font-size: 21px;
z-index: 1;
}
-nav > ul {
- width: 900px;
- display: table;
- table-layout: fixed;
-}
-
-nav ul ul {
- display: none;
-}
-
-nav > ul > li > a {
- margin-left: 1px;
- margin-right: 1px;
-}
-
-nav li:hover > ul {
- display: block;
-}
-
nav ul {
position: absolute;
- font-family: NothingYouCouldSay;
- font-size: 21px;
-}
-
-nav li:hover > a {
- background-color: #777777;
}
-nav li:hover ul a {
- background-color: #EEEEEE;
+nav > ul {
+ width: 900px;
+ display: table;
+ table-layout: fixed;
}
nav li {
@@ -47,33 +26,50 @@ nav li:before {
margin-left: 0px !important;
}
+nav ul ul li {
+ display: block;
+ float: none;
+ min-width: 150px;
+}
+
nav a {
- height: 50px;
- line-height: 50px;
text-align: center;
color: white;
text-decoration: none;
display: block;
+ margin-left: 1px;
+ margin-right: 1px;
+}
+
+nav > ul > li > a {
+ height: 50px;
+ line-height: 50px;
background-color: #333333;
}
-nav ul ul li {
- display: block;
- float: none;
- min-width: 150px;
- margin-left: 1px;
- margin-right: 1px;
+nav > ul > li:hover > a {
+ background-color: #777777;
}
nav ul ul a {
+ background-color: #EEEEEE;
+ visibility: hidden;
+ opacity: 0;
+ height: 0px;
+ line-height: 21px;
padding: 0 20px;
color: black;
}
-nav a:hover {
- color: white;
+nav ul li:hover a {
+ visibility: visible;
+ opacity: 1;
+ height: 50px;
+ line-height: 50px;
}
-nav ul ul a:hover {
+nav a:hover {
+ transition: all 0.2s ease;
background-color: #777777;
+ color: white;
}