- This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I’ve seen some ways to do this with JS, but any tricks on doing this with just CSS? I’ve got a list laid out with some text and a couple of images, 12 total going down the page, and I’d like to have the entire space clickable when the mouse hovers over. Right now, I’ve got an tag around the content, and it just makes each element clickable. I wrapping the content in a
and the
around that, but same result, same with a
. Any suggestions?
Room One
Once the private boudoir for the lady of the house and decorated in the same soft colors of moss, gold, basil, and dark quartz; this guest room features a king-sized custom half-tester mahogany bed, a soft double chaise, flat screen television and a working fireplace with mosaic tile work original to the house. The attached private bath has a large whirlpool tub with double shower heads.
Quiet Season: $160
High Season: $255
Transition & New Year's: $205
Check Availability!
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';
});
Thank you, richtestani, I’ll try that appoach!