3

On my site I have a few links within lists. I was wondering if it is possible to make it so I can click on the entire list area, rather than just where the inner link sits. An example is my "post" link at the top right of the page.

This is the code I'm working with: http://jsfiddle.net/spadez/XgSBf/1/

I tried to put the link outside the list like this but it didn't work:

<a href=#><li>test</li></a>
asked Jun 5, 2013 at 12:44
2

4 Answers 4

3

It's not good coding. try this:

<li><a href="#" style="display: block">test</a></li>
answered Jun 5, 2013 at 12:47
Sign up to request clarification or add additional context in comments.

Comments

2

Add display:block to a tag

a {
 text-decoration: none; display:block
}

DEMO

answered Jun 5, 2013 at 12:49

Comments

2

Add style="display:block" to anchor tag. adding display block make this area of link click able

answered Jun 5, 2013 at 12:55

Comments

1
<li><a style="display:block;" href="some_page.extension">Next</a></li>

Rather try something like above. Include the link within your 'list item' tag, this way you make the entire area clickable.

answered Jun 5, 2013 at 12:50

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.