I have the following markup,
How to make the HTML link activated by clicking on the
- ?
By making your link as big as your li: just move the instruction
display: block;
from li to a and you are done.
That is:
#menu li
{
/* no more display:block; on list item */
list-style: none;
background: #e8eef4 url(arrow.gif) 2% 50% no-repeat;
border: 1px solid #b2b2b2;
padding: 0;
margin-top: 5px;
}
#menu li a
{
display:block; /* moved to link */
font-weight: bold;
text-decoration: none;
line-height: 2.8em;
padding-right:.5em;
color: #696969;
}
Side note: you can remove "ul" from your two selectors: #menu is a sufficient indication except if you need to give weight to these two rules in order to override other instructions.