Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
42
rated 0 times [  47] [ 5]  / answers: 1 / hits: 43731  / 14 Years ago, tue, july 20, 2010, 12:00:00

I have a link inside a div and I need to make the whole div clickable... found several tutorials on the Internet but non of them worked for me...


More From » html

 Answers
17

If you're saying you want the entire div to be clickable for navigation, then you can either wrap it with an anchor () tag, which is not standards compliant, or add a css style to the contained anchor tag, making it the size of the containing div, which is standards compliant. I will use a div that is 250px by 250px in this example:



<div id=container><a href= style=display:block;width:250px;height:250px;>Link</a></div>

[#96166] Saturday, July 17, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
karivictoriab

Total Points: 530
Total Questions: 90
Total Answers: 95

Location: Honduras
Member since Sun, Dec 26, 2021
2 Years ago
;