hello peeps,
as per the title , this is more a question for someone to help me understand why , rather than needing a fix for something.
I have a CSS menu , nothing special there ...
CSS ......
now what idon't under stand is if you hover over the part that has a sub menu, you don't need to be over the actual text (anchor) any part of the 'ul li ul li' will do, however for those with no sub menu you seem to have to hover over the text (anchor) for the link to work.
HOWEVER ... I have found that if I add width:100%; to the
it then behaves like the sub menus do enabling any part of the menu section to be clicked for the link to work.
WHY? it isn't required for the '#menu ul li ul li a' so why is it required for the '#menu ul li a'
I have to be missing something some where, can someone enlighten me please.
thanks 1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
as per the title , this is more a question for someone to help me understand why , rather than needing a fix for something.
I have a CSS menu , nothing special there ...
Code:
<div id="menu" >
<ul>
<li><a href="index.html">Home</a></li>
</ul>
<ul>
<li><h2>Services</h2>
<ul>
<li><a href="index.html">Tax</a></li>
<li><a href="index.html">Investment</a></li>
<li><a href="index.html">UK Mortgages</a></li>
<li><a href="index.html">Legals</a></li>
<li><a href="index.html">Insurance</a></li>
<li><a href="index.html">Currency</a></li>
<li><a href="index.html">Calculator</a></li>
</ul>
</li>
</ul>
<ul>
<li><a href="index.html">Enquiry</a>
</li>
</ul>
<ul>
<li><h2>Publications</h2>
<ul>
<li><a href="index.html">Articles</a></li>
<li><a href="index.html">Books</a></li>
</ul>
</li>
</ul>
<ul>
<li><h2>Countries</h2>
<ul>
<li><a href="index.html">France</a></li>
<li><a href="index.html">Spain</a></li>
<li><a href="index.html">Protugal</a></li>
<li><a href="index.html">Italy</a></li>
<li><a href="index.html">Cyprus</a></li>
<li><a href="index.html">Carribean</a></li>
<li><a href="index.html">Florida</a></li>
<li><a href="index.html">Other</a></li>
</ul>
</li>
</ul>
</div>
CSS ......
Code:
#menu{
width:800px;
float:left;
margin-bottom:5px;
}
#menu ul li ul li a, #menu ul li a, #menu h2 {
font:bold 11px/16px arial,helvetica,sans-serif;
display:block;
border-width:1px;
border-style:solid;
border-color:#ccc #888 #555 #bbb;
white-space:nowrap;
margin:0;
padding:1px 0 1px 3px;
text-align:center;
}
#menu h2{
color:#fff;
text-transform:uppercase;
text-align:center;
background:#000 url(/images/expand3.gif) no-repeat 100% 100%;
}
#menu ul li a{
color:#fff;
text-transform:uppercase;
background:#000;
}
#menu ul li ul li a{
background:#eee;
text-decoration:none
}
#menu ul li ul li a, #menu ul li ul li a:visited{
color:#fff;
}
/* HOVER COLOUR */
#menu ul li a:hover , #menu ul li ul li a:hover{
color:#f00;
background:#ddd;
}
#menu ul li ul li a:active{
color:#006;
background:#ccc;
}
#menu ul{
list-style:none;
margin:0;
padding:0;
float:left;
width:160px;
}
#menu li{
position:relative;
list-style:none;
}
#menu ul ul{
position:absolute;
z-index:500;
top:auto;
display:none;
}
#menu ul ul ul{
top:0;
left:100%;
}
now what idon't under stand is if you hover over the part that has a sub menu, you don't need to be over the actual text (anchor) any part of the 'ul li ul li' will do, however for those with no sub menu you seem to have to hover over the text (anchor) for the link to work.
HOWEVER ... I have found that if I add width:100%; to the
Code:
#menu ul li a{
color:#fff;
text-transform:uppercase;
background:#000;
[b] width:100%;[/b]
}
it then behaves like the sub menus do enabling any part of the menu section to be clicked for the link to work.
WHY? it isn't required for the '#menu ul li ul li a' so why is it required for the '#menu ul li a'
I have to be missing something some where, can someone enlighten me please.
thanks 1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.