•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 392,076 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,053 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 1574 | Replies: 1
![]() |
•
•
Join Date: Oct 2006
Location: somewhere in West-Africa
Posts: 196
Reputation:
Rep Power: 2
Solved Threads: 6
I would like a table cell to act as my hyperlink. What I have currently is a hyperlink embedded in a table cell, hence it is only when the exact underlined hyperlink text is clicked that the url is obeyed. But not when you click anywhere else. [e.g <tr><td><a href=www.meme.com>clickMe </a></td></tr>]
In the example, the url only works where I click on "Click Me" and not anywhere on the table cell. Please, a helping hand is needed.
In the example, the url only works where I click on "Click Me" and not anywhere on the table cell. Please, a helping hand is needed.
Last edited by jamello : Nov 1st, 2006 at 10:34 am.
•
•
Join Date: Oct 2006
Location: Sofia, Bulgaria
Posts: 135
Reputation:
Rep Power: 2
Solved Threads: 7
•
•
•
•
I would like a table cell to act as my hyperlink. What I have currently is a hyperlink embedded in a table cell, hence it is only when the exact underlined hyperlink text is clicked that the url is obeyed. But not when you click anywhere else. [e.g <tr><td><a href=www.meme.com>clickMe </a></td></tr>]
In the example, the url only works where I click on "Click Me" and not anywhere on the table cell. Please, a helping hand is needed.
Hi there.
If you try to code it like this :
<table><tr><a><td>My link here</td></a></tr></table>
your code may not validate, or result in another error.
Do you have something else apart from text link inside your cell?
In case you have some short text, e.g. "Click here" and your cell is wither or higher than this text, you can make one of the following:
Case 1 - your text is wide as wide as the cell is, however it is not that high - you can set it like this with css:
[HTML]...<td style="line-height: 50px; font-size: 12px;"><a href="#"> Click me! </a></td>...[/HTML]
In this way, if your cell is 50px high, and your text size is 12px, wherever you point your cursor - it will change as a link pointer.
Case 2
Well - it si more complex, and if you have any other elements in this cell, like images, additional text, etc. it may turn to be a problem, still you can try it. You can set the following css to your link:
[HTML]...<a href="#" style="display: block; width: 100px; height: 50px;">Click me!</a>....[/HTML]
Try it and advise...
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
- css div's and tables table cells and scrolling (HTML and CSS)
- Add or Insert a "Content Table" using MS FrontPage (Site Layout and Usability)
- php table help (PHP)
- workaround for IE table layout bugs (Existing Scripts)
- can't delete text from table cells (Site Layout and Usability)
- Large and tables/cells..how? (HTML and CSS)
- Creating submenus in table cells (JavaScript / DHTML / AJAX)
Other Threads in the HTML and CSS Forum
- Previous Thread: Question about forms
- Next Thread: Selecting MYSQL into fields


Linear Mode