djp1988 Posted June 26, 2008 Share Posted June 26, 2008 How can I get a whole <li> to be linked and not juste the test that is inside it?I am using a code to make the li background color change so it's sort of like the whole li is a button, but I want to make it so you can click anywhere inside the li not necessarily on the text to go to the desired page Link to comment Share on other sites More sharing options...
Ingolme Posted June 26, 2008 Share Posted June 26, 2008 Well, what you can do is display the link as a block and apply all the style to the link. Example:HTML<ul><li><a href="URL">Link</a></li></ul>CSSli a {display: block;height: 2em;font-size: 1em;background-color: blue;}li a:hover {background-color: red;} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.