473,569 Members | 3,043 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

make a table a link without javascript?

In several of my pages I need to show an area with a background image
and HTML text in certain places. The restrictions I have is that I
can't use javascript or CSS positioning like 'float', so I did it with
a table.
I then tried <a href="..."><tab le ...>...</table></a and it worked in
Firefox but not in IE. I then found out that <tableshouldn 't go
inside <a>. So I put the <a href="..."insid e every <tdin the table,
but it doesn't cover the whole area for some reason.
This is the actual code (just removed stuff to make it smaller/clearer)
<table cellspacing="0" cellpadding="0"
style="backgrou nd-image:url(upper _image.jpg)">
<tr><td colspan="3"><a href="..."><img src="blank.gif" alt=" "
width="217" height="10" border="0"></a></td></tr>
<tr valign="top">
<td><a class="nulink" href="..."><img src="blank.gif" alt=" "
width="1" height="2 05" border="0"></a></td>
<td width="124" align="center">
<table cellspacing="0" cellpadding="0" style="margin-top:5px">
<tr><td align="center"> <a href="..."><spa n>text</span></a></td></tr>
<tr><td><a href="..."><img src="blank.gif" alt=" " width="1"
height="10" border="0"></a></td></tr>
<tr><td align="center" width="124"><a href="..."><spa n
class="ad6">tex t </span></a></td></tr>
<tr><td align="center" width="124"><a href="..."><spa n
class="ad6">tex t </span></a></td></tr>
<tr><td align="center" width="124"><a href="..."><spa n
class="ad6">tex t</span></a></td></tr>
</table>
</td>
<td><a href="..."><img src="blank.gif" alt=" " width="92" height="1"
border="0"></a></td>
</tr>
</table>

The problem is that the only clickable area is where the text is, not
the area below it. The table has 2 columns, one is a 205 px high line
so the image shows complete, the second column is a new table with the
actual text, problem is that the table doesn't cover the whole height
(205px) so the area below it is not clickable. I guess I can put
another row in this table with an image that covers the area, but
what'd happen if the user made the text larger? it'd probably push this
image down and screw the layout.
Not sure what to do here.

Aug 8 '06 #1
3 8717

wo******@gmail. com wrote:
I then tried <a href="..."><tab le ...>...</table></a and it worked in
Firefox but not in IE. I then found out that <tableshouldn 't go
inside <a>.
Did you post this a week or two ago, or was it someone else with the
same question?

Put <a href="..." >...</ainside one or more <td>

Use JavaScript to make the whole table a clickable link, using an
onclick event handler.

It works as you want for most people with JS, and the non-JS fallback
is acceptable.

Aug 8 '06 #2

Andy Dingley wrote:
wo******@gmail. com wrote:
I then tried <a href="..."><tab le ...>...</table></a and it worked in
Firefox but not in IE. I then found out that <tableshouldn 't go
inside <a>.

Did you post this a week or two ago, or was it someone else with the
same question?
no wasn't me, but for some reason I didn't see that question when I
searched
Put <a href="..." >...</ainside one or more <td>

Use JavaScript to make the whole table a clickable link, using an
onclick event handler.

It works as you want for most people with JS, and the non-JS fallback
is acceptable.
yeah that's kinda like what I was doing (except for the javascript for
those with javascript enabled). Was thinking maybe there was something
I could do like height="100%" or something but don't think that works
or if it's even universally supported.
Thanks

Aug 8 '06 #3
wo******@gmail. com wrote:
In several of my pages I need to show an area with a background image
and HTML text in certain places. The restrictions I have is that I
can't use javascript or CSS positioning like 'float', so I did it with
a table.
I then tried <a href="..."><tab le ...>...</table></a and it worked in
Firefox but not in IE. I then found out that <tableshouldn 't go
inside <a>. So I put the <a href="..."insid e every <tdin the table,
but it doesn't cover the whole area for some reason.
Because of margins, padding, etc.

Regarding getting an A to fill up a space, find some tips at

http://www.alistapart.com/articles/slidingdoors/

and the follow-up article,

http://www.alistapart.com/articles/slidingdoors2/
Aug 8 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4308
by: ajay | last post by:
I have following code for a slide menu but i twiked it to work for a single level menu. Open it in a Browser to get a clear picture. I have 2 Qs 1) How to make first entry as non-link. i.e i want to make first text as Table Heading/menu category. For examle in the given menu i want to make a heading as "Comp. Languages" which won't be a...
1
2114
by: Robert | last post by:
I created two pages. One using CSS and the other using a table. I'd like the css version to work like the table version. The problem arises when the full image doesn't fit in the window. Click on the moon thumb to see the problem. In IE 5.2 on MacOS 10.2.6, the moon drops down below the list of thumbs. I'd like it to say to the right of...
31
6947
by: Royal Denning | last post by:
I am designing a table with 2 columns and 20 rows. I want to insert small images (each with a link) and a text title in each cell of the table. On refresh of the page, I would like to have the contents of each cell (picture/link and associated text) rotate randomly. Note that the text titles must remain with their associated picture and...
0
1838
by: Gianfranco | last post by:
Hi I got a problem with 2 tables. I have a table, say A, with x records, coming from a make table query and a table, say B, with y records, coming from another make table query. I need to join and link the 2 tables, so that the first record of A is associated with the fist record of B, the second record of A is associated (I mean,in the same...
10
9180
by: Luke | last post by:
Hi. I am trying to make correct layout, here is an example of (dynamically generated content via jsp): http://localhost/www/layout.htm Most outer div is positioned absolute (if not then it will not grow when content inside div.body is greater than width of window of user agent), anyway anyone knowlegable can see it in sources...
6
4855
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still...
0
8438
by: Romulo NF | last post by:
I´ve recently posted a script to move columns from a table using drag and drop javascript. Recently i´ve received a message of a user of this communty showing interest in the script to move lines instead of columns. This post will present the script for you guys. file: moverows.css table {border-collapse:collapse; cursor:pointer} td...
4
4964
by: Jim Devenish | last post by:
I wish to copy a table on a SQL Server backend to a table on an Access (.mdb) front end in the simplest way. I have the following to get the recordset but am seeking something easier. Dim theConnectionString theConnectionString = "Driver=SQL Server; Server=Server;Database=myData;Trusted_Connection=Yes"
20
1969
by: Prisoner at War | last post by:
Hi, People, Is it possible to have an "empty" or "dummy" <a href***without*** the browser jumping back up the page?? I have a hyperlink that doesn't point to another document, but is used to call forth a modal window onClick (or is there another way, without text or image links, of calling forth JavaScript on user activity??). I would...
0
7930
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7681
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.