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
$(".exterior a").click(function(e){
alert('a clicked but div not triggered');
e.stopPropagation();
});
$(".exterior").click(function(e){
alert("div clicked but not a");
})
.exterior{
width: 500px;
height: 100px;
background-color: red;
}
I used stop propagation on a element to prevent it from triggering the click on the div. And i used div as wrapper so you would have to put a windows.location if you want to redirect to an url inside the click function.
I'm not sure how you can achieve this with simply html and css. So i would suggest using jquery.