anchor <a> for entire <td> column

Posted on 2005-05-02
Last Modified: 2006-11-18
How can I get an anchor <a href="..."> inside a table cell <td> to
apply to the entire cell? The css width works for I.E., but not for
Netscape. In the code below, the red is an active link. In I.E.
it applies to the entire width of the cell. But in Netscape, it
applies only to the text "aaa".

<tr><td><a href="" style="{width:100%; background-color:red}">aaa</a></td></tr>

Question by:lfrohman
    LVL 30

    Accepted Solution

    <tr><td><a href="" style="display:block; width:100%; background-color:red">aaa</a></td></tr>
    LVL 33

    Expert Comment

    This works well too, if they "miss" the link

    <td onclick='location.href="";'><a href="">Blah</a></td>

    Featured Post

    Course: Create Mobile App Prototypes with Adobe XD

    This is a project-based course: we go through all the steps of creating a prototype from start to finish, using all the tools and features currently available in Adobe XD. You can complete the course in less than a day, plus all project files and fonts are included.

    Join & Write a Comment

    Suggested Solutions

    Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
    Read about why website design really matters in today's demanding market.
    This video teaches users how to migrate an existing Wordpress website to a new domain.
    The viewer will learn how to dynamically set the form action using jQuery.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now