Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4530998
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T13:51:38+00:00 2026-05-21T13:51:38+00:00

I am trying to make an entire table cell clickable. The general advice I

  • 0

I am trying to make an entire table cell clickable. The general advice I have found is to use display: block; but all of the examples I have seen have only a single line cells. I have cells with rowspans that seem to make life harder.

Consider this brightly coloured example:

<html>
    <head>
        <style type="text/css">
            td { border: 1px; background-color: blue; }
            td a { display: block; background-color: yellow; border: 1px solid red; }
        </style>
    </head>
    <body>
        <table>
            <tr>
                <td rowspan=2><a href="#">Left</a></td>
                <td><a href="#">Upper Right</a></td>
            </tr>
            <tr>
                <td><a href="#">Lower Right</a></td>
            </tr>
        </table>
    </body>
</html>

The anchor tag’s block (yellow) is all clickable. But the left hand side has (blue) margins above and below it that are not clickable. I guess I need something to increase the padding to fill the full td cell on the left (without changing the size of the cells on the right), but I haven’t been able to find the right incantation to do this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T13:51:39+00:00Added an answer on May 21, 2026 at 1:51 pm
    td a {
        display: inline-block;
        height: 100%;
        width: 100%;
        background-color: yellow;
        border: 1px solid red;
    }
    

    Demo

    example

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to make the rows of a table have a highlight color
I have a stored procedure (below) that returns the entire table. I am trying
I am trying to make a special kind of jtable. I want the entire
Currently, when I create a table, and I mouseover a cell, that entire row
I have been trying to make something work with JQuery. I have the following
I'm trying to make a background stretch the entire body (width only). This works
I am trying apply two background images for an entire table row. One background
I'm trying to make a 2x2 grid, which fills up the entire window in
I'm trying to make an Invoice Table, later when the customer finishes, I want
I'm trying to make a Vector3D class in my c++ application. For my entire

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.