Is there a way to make a div a link? I have some information in a div and i dont want then to have to click the image next to the text to have to go to the content so i would like the entire div to be a link.
Clicking Divs
Started by Hip Hop Artist, Nov 03 2007 11:06 AM
6 replies to this topic
#1
Posted 03 November 2007 - 11:06 AM
#2
Posted 03 November 2007 - 12:25 PM
This question has been asked before, please use the forum search.
http://www.pixel2lif...showtopic=20224
http://www.pixel2lif...showtopic=20224
#3
Posted 03 November 2007 - 03:08 PM
thats not it anyways.......thats to make a link inside a div, im looking to make a div the link itself.
#4
Posted 03 November 2007 - 06:41 PM
Hip Hop Artist, on Nov 4 2007, 09:08 AM, said:
thats not it anyways.......thats to make a link inside a div, im looking to make a div the link itself.
The link given does provide an option to allow a div to be clickable using JavaScript handlers.
But if you want to do it for simplicity sakes, then just wrap the div in particular in the <a> tag and I believe you'll have what you're wanting to accomplish.
#5
Posted 03 November 2007 - 11:00 PM
wrapping the div in the <a> messes it up do this,
You can replace the code with whatever you want but this will make your div clickable as a link. The html should look like this:
#div a:link, a:visited {
backgroundimage: blah;
font_decoration: none;
}
#div a:hover, a:active {
backgroundimage: blah;
font-decoration: underline;
}
You can replace the code with whatever you want but this will make your div clickable as a link. The html should look like this:
<div id="div"> <a href="b"> I like to go to the park </a> </div>
#6
Posted 04 November 2007 - 01:24 AM
Hip Hop Artist, on Nov 3 2007, 02:08 PM, said:
thats not it anyways.......thats to make a link inside a div, im looking to make a div the link itself.
http://www.pixel2life.com/forums/index.php...st&p=130771
Lastcrime, on Nov 3 2007, 10:00 PM, said:
wrapping the div in the <a> messes it up do this,
#7
Posted 05 November 2007 - 08:00 AM
ok sorry rc69, and thanks for the help all!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
