Sign in to follow this  
Axiverse

[web] Clicky Block

Recommended Posts

Axiverse    366
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
Sander    1332
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this