Jump to content
  • 0

Есть горизонтальное выпадающее меню в низ, но как его переделать чтобы он выпадал в верх?


lektor
 Share

Question

Есть горизонтальное выпадающее меню в низ, но как его переделать чтобы он выпадал в верх?

Код естественно прилагается):

#nav { 
margin: auto;
z-index: auto;
display: block;
}
#nav li { float: left; }
#nav li:hover { position: relative }
#nav li:hover > a {
background: #021A1A;
box-shadow: 5px 5px 25px #000;
-moz-box-shadow: 5px 5px 25px #000;
-webkit-box-shadow: 5px 5px 25px #000;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}
#nav li.sub:hover > a {
border-radius: 10px 10px 0 0;
-moz-border-radius: 10px 10px 0 0;
-webkit-border-radius: 10px 10px 0 0;
}
#nav li a {
color: #fff;
font-weight: bold;
text-decoration: none;
padding: 12px;
display: block;
}
#nav li a:hover { background-color: #021A1A; }
#nav li ul {
background: #fff;
margin-top: -2px;
display: none;
}
#nav li:hover ul {
display:block;
position:absolute;
}
#nav li ul {
background: rgba(255,255,255,0.5);
padding: 10px 5px;
box-shadow: 5px 5px 25px #000;
-moz-box-shadow: 5px 5px 25px #000;
-webkit-box-shadow: 5px 5px 25px #000;
border-radius: 0px 15px 15px 15px;
-moz-border-radius: 0px 15px 15px 15px;
-webkit-border-radius: 0px 5px 5px 5px;
}
#nav li ul li a, #nav li ul li a:hover {
background: transparent;
color: #000;
width: 150px;
font-size: 0.95em;
font-weight: normal;
}
#nav li ul li a:hover { text-decoration: underline;
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
border-radius: 0;
-moz-border-radius: 0;
-webkit-border-radius: 0;
}

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy