html - Why does the menu hovering behave different for these items on a list? -


http://jsfiddle.net/z9wag/

for music links hovering , aligning works, not pictures! why? it's same types, see it, should work same way. can see, though, doesn't. i've tried compare them, , pretty same in code.

html:

   <link href="stylesheet.css" rel="stylesheet" type="text/css">     <title>home</title> </head> <body>     <div id="menubox">         <ul>         <li><a href="http://folk.ntnu.no/arnstekl/" class="link">home</a></li>         <li><a href="#" class="link">music</a>             <ul>                 <li><a href="https://soundcloud.com/arnsteinkleven/" class="link" target="_blank">my music</a></li>                 <li><a href="http://folk.ntnu.no/arnstekl/gilberto.html" class="link" target="_blank">the joao gilberto project</a></li>            </ul></li>         <li><a href="https://www.github.com/arnstein" class="link" target="_blank">github</a></li>         <li><a href="#" class="link">pictures</a>             <ul>                  <li><a href="http://www.flickr.com/photos/92472314@n03/" class="link" target="_blank">flickr</a></li>                  <li><a href="https://plus.google.com/photos/104927400856808784381/albums/" class="link" target="_blank">google+ albums</a></li>              </ul></li>          <li><a href="https://twitter.com/arnsteinkleven" class="link" target="_blank">twitter</a></li>           </ul>      </div>     <div id="circle">         <p id="title"> &alpha; <br> &gamma; <br> &pi; <br> &zeta; <br> &tau; <br> &xi; <br> &iota; <br> &pi; </p>     </div>     </body> 

css:

#menubox {     width: 8%;     height: 30%;     border: 10% solid #c7d93d;     border-radius: 5%;     position: fixed;     margin-top: 12%;     margin-left: 18%;     font-family: ubuntu, futura, trebuchet ms;     list-style: none;     float: left; }   #menubox ul li {     text-align: left;     font-size: 200%;     color: #fff0a5; }  #menubox ul li {     color: #468966;     font-family: ubuntu, futura, trebuchet ms;     float: left;     margin-right: 10px;     position: relative; }  #menubox ul {     color: #468966;     font-family: ubuntu, futura, trebuchet ms; }  #menubox ul ul {     position: absolute;     left: -9999px;     list-style: none; }  #menubox ul ul li {     float: left;     margin-left: 40%;     position: relative;     font-size: 60%;     text-align: left;  }  #menubox ul ul {     white-space: nowrap; }  #menubox ul li:hover {     text-decoration: none;     color: #ffb03b; }   #menubox ul li:hover ul {     left: 0;     top: 0;     z-index: 100;     color: #ffb03b; }  #menubox ul li:hover ul {     text-decoration: none;     color: #fff0a5; }  #menubox ul li:hover ul li a:hover {     color: #ffb03b; }   div p {     color: #fff0a5;     text-align: center;     position: relative;     vertical-align: middle;     display: inline-block;     margin-top: 300px;     line-height: 60px; }   #circle {     border-radius: 100%;     -webkit-border-radius: 100%;     -moz-border-radius: 100%;     background-color: #b64926;     width: 500px;     height: 500px;     display: block;     position: fixed;     margin-top: 9%;     margin-left: 52%;     text-align: center; }  #title {     text-color: #fff0a5;     font-size: 350%;     display: inline;     text-align: center; }  body {     height: 100%;     width: 100%;     background-color: #468966;     font-family: ubuntu, futura, trebuchet ms; }  .link {     text-color: #fff0a5;     text-decoration: none;     text-align: left; } 

by making menu lis same width, seems have eliminated issue me.

#menubox ul li {     color: #468966;     font-family: ubuntu, futura, trebuchet ms;     float: left;     margin-right: 10px;     position: relative;     width:190px; } 

http://jsfiddle.net/z9wag/2/


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -