I'm trying to make simple hover drop down menu in my header it works fine except on hover it shows additional buttons and i can't find the reason for that
Jsfiddle : http://jsfiddle.net/gpf5n/#&togetherjs=EleDQDiDLG
HTML:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Hotel</title> <link rel="stylesheet" type="text/css" href="Hotel.css"> <script src="HotelM.js"></script> </head> <body> <main> <header> <div></div> <nav> <ul class="Menu1"> <li><a class="MenuButtons" href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> </ul> <ul class="Menu"> <li><a class="MenuButtons" href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> </ul> <ul class="Menu"> <li><a class="MenuButtons" href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> </ul> <ul class="Menu"> <li><a class="MenuButtons" href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> </ul> <ul class="Menu"> <li><a class="MenuButtons" href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> <li><a href="#">ASD</a></li> </ul> </nav> </header> </main> </body> </html> CSS:
body , div ,h1, h2, section,canvas, main, footer , header , p , a, article, ul ,li, ol, table { margin: 0; padding: 0; box-sizing: border-box; } main{ width: 1000px; height: auto; margin: 0 auto; /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#2ab0ed+0,9fd8ef+27,9fd8ef+27,bfe8f9+52,9fd8ef+79,2ab0ed+100 */ background: rgb(42,176,237); /* Old browsers */ background: -moz-linear-gradient(-45deg, rgba(42,176,237,1) 0%, rgba(159,216,239,1) 27%, rgba(159,216,239,1) 27%, rgba(191,232,249,1) 52%, rgba(159,216,239,1) 79%, rgba(42,176,237,1) 100%); /* FF3.6-15 */ background: -webkit-linear-gradient(-45deg, rgba(42,176,237,1) 0%,rgba(159,216,239,1) 27%,rgba(159,216,239,1) 27%,rgba(191,232,249,1) 52%,rgba(159,216,239,1) 79%,rgba(42,176,237,1) 100%); /* Chrome10-25,Safari5.1-6 */ background: linear-gradient(135deg, rgba(42,176,237,1) 0%,rgba(159,216,239,1) 27%,rgba(159,216,239,1) 27%,rgba(191,232,249,1) 52%,rgba(159,216,239,1) 79%,rgba(42,176,237,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2ab0ed', endColorstr='#2ab0ed',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */ } header{ width: 100%; height: 100px; background-color: #7142AA; } header div{ height: 50%; width: 100%; } header nav{ height: 50%; width: 100%; padding-left: 0.5%; } header nav ul{ list-style-type: none; } nav ul{ display: inline-block; width: 15%; height: 100%; } nav li{ height: 100%; } nav a{ font-size: 1.7em; text-decoration: none; background-color: #6025A8; display: block; width: 100%; height: 100%; text-align: center; display: none; } .MenuButtons{ font-size: 1.7em; text-decoration: none; background-color: #6025A8; display: block; width: 100%; height: 100%; text-align: center; display: block; } .Menu1:hover a{ display: block; }