Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get link to span whole <li> 1

Status
Not open for further replies.

bezierstek

Programmer
Aug 30, 2007
43
FR
Hi,

I'm sure this has probably been dealt with before but I can't find it anywhere.

I have a menu that is based in an unordered list, and want the link to span the whole <li>, not just the link text. I have a css rollover in the menu that needs to display the entire width of the <li>. Alternatively if the rollover can be displayed full width that would be fine too.

Can this be done, and if so can someone point me to where to get started on it.

Thanks,
 
Make the <a> tag a block level element


Code:
li a { display:block; }


or, inline

Code:
<li><a style="display:block;" href="somepage.html">My link</a></li>

--
Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.


 
Of Course!!

I knew it was something simple.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top