Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Modern way to link around a span or div of mixed content? Re: Modern way to link around a span or div of mixed content?

#54006
richtestani
Member

I don’t think nesting anchors is a very good approach. I would wrap your content in a div, then use your markup correctly.

With CSS, use:

#mydiv {
cursor: pointer;
}

I would then set the div clickable with JS:


$('#mydiv').click(function() {
location.href = '/my_page';
});