a t
a t

Reputation: 11

how can i make the whole TD area become clickable?

I am a new css/html learner and I am currently building a website. I have hover working, but I can't make it become clickable. I wanted the whole TD area become clickable not just only the text link become clickable.

Could anyone give me a hand and help me figure it out?

here is my code

Upvotes: 1

Views: 7739

Answers (2)

Raik
Raik

Reputation: 386

a {
    display:block;
    width:100%;
    height:100%;
}

Upvotes: 5

Zoltan Toth
Zoltan Toth

Reputation: 47667

Add this rule to your CSS

td.blue span, td.blue span a {
    display: block;
    height: 100%;
    width: 100%;
}

DEMO

Just a sidenote - you don't need to wrap your links in <span>-s

Upvotes: 1

Related Questions