Jump to content
  • Advertisement
Sign in to follow this  

[web] Clicky Block

This topic is 4095 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So here's my problem. I have a css class that has a fixed size. I want to have this entire area inside the class clickable in the html, is this possible? The class is fixed size with a "a" and "a:hover" with background images which is why i don't want to use images.

Share this post


Link to post
Share on other sites
Advertisement
Sure, just use the anchor as the block itself. e.g.


a.myblock {
display: block;
width: 100px;
height: 100px;
background-image: url(/path/to/image.png);
}


Some browsers probably need an empty space or an   in the a-tag for that to work correctly.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!