I have a div. I want it to link somewhere when you click on it, but I also want to put other links inside it, so when you click on the other links you\'re redirected to one plac
You can use the javascript onclick
event on the parent element of the link(s):
.exterior {
display: block;
width:100px;
height:100px;
border: 1px black solid;
}
I don't recommend to use in
element. Using
in
isn't valid. You can check the following document on the W3C validator:
test link in link
test
You can also use two different elements (without using javascript - only CSS solution):
div {
position:relative;
border:1px solid red;
height:200px;
width:200px;
}
div a.ext {
position:absolute;
top:0;
left:0;
right:0;
bottom:0;
z-index:0;
}
div a.int {
position:relative;
z-index:999;
}