Closed Thread Icon

Topic awaiting preservation: How to make a cell as a link? Pages that link to <a href="https://ozoneasylum.com/backlink?for=8302" title="Pages that link to Topic awaiting preservation: How to make a cell as a link?" rel="nofollow" >Topic awaiting preservation: How to make a cell as a link?\

 
Author Thread
flyer
Bipolar (III) Inmate

From: Helsingborg, Sweden
Insane since: Oct 2000

posted posted 09-11-2002 09:36

Is there a way of making a whole table-cell into a link?
Look at this site and the pop-up menu to rightmost "Om resurs"
http://193.15.214.161/RESURS/RESFIN/site2/menu.htm

Don't mind the crappy look! It's just for testing and it looks
better on my local machine. But anyway... as it is now, only the
letters in the words act as a link.

I want to make the whole cell into a link, if possible.. :?

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 09-11-2002 09:58

try to add this style sheet property to the <a style='display:block'>
if that didn't work, try to pad the link with spaces as:
<a href='mylink.htm'>goto 1&nbsp;&nbsp;&nbsp;&nbsp;</a>

good luck,

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 09-11-2002 13:18

Like this?:
http://www.meyerweb.com/eric/css/edge/popups/demo.html
http://www.meyerweb.com/eric/css/edge/popups/demo2.html

___________________
Emps

FAQs: Emperor

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 09-11-2002 14:28

Yes, I believe that's what he meant.
Emps, nice site, 10x!

flyer
Bipolar (III) Inmate

From: Helsingborg, Sweden
Insane since: Oct 2000

posted posted 09-12-2002 10:53

Yeah, that's it!
I eventually found a script on dynamicdrive.com though
but I had to type alot of invisible characters too, to make the whole
cell as a link. I'll have look at your site too. Thnx..

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 09-13-2002 01:02

I've use a simple little hack like this (follows). I know it doesn't work in older Netscape browsers, but somewhere in these last couple months I've pretty much opted to just blow that browser off, I don't use it anymore, why should other people? ;-) This following bit should work in all modern IE versions, as well as Mozilla. Of course, it doesn't work in Opera, but does anything, really?

Link: http://www.bigbonfire.com/testCSS.html

------------------------
<table border=0>
&nbsp;<tr>
&nbsp;&nbsp;<td class="cellButton"
&nbsp;&nbsp;&nbsp; onMouseover ="overView(this);"
&nbsp;&nbsp;&nbsp; onMouseout="outView(this);"
&nbsp;&nbsp;&nbsp; onClick="location.href='/myPage.html';"> This is my button/cell text </td>
&nbsp;</tr>
</table>
-------------( stylesheet )----------------
<style type=text/css>
&nbsp;&nbsp;&nbsp; .cellButton { background-color:#fff;color:#000;border:#999 1px solid;font-family:Verdana;cursor:hand; }
&nbsp;&nbsp;&nbsp; .cellButton2 { background-color:#000;color:#fff;border:#999 1px solid;font-family:Verdana;cursor:hand; }
</style>
-------------( javascript )----------------
<script language="Javascript">
&nbsp;&nbsp;&nbsp; function overView(that) { that.className = 'cellButton2'; }
&nbsp;&nbsp;&nbsp; function outView(that) { that.className = 'cellButton'; }
</script>

Your pal, -doc-

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-13-2002 01:12

Haha - Doc, I like how you pass "this" into "that" =)

The disadvantage of Doc's method is that it won't work for people who navigate a web page without a mouse - for instance, someone using their keyboard to tab through links, or someone using a screen reader or an otherwise non-visual browser. The easiest solution to this problem is to put a redundant hyperlink around relevant text in the table cell that goes to the same place, but using an actual <a> tag. Just style the tag so that it doesn't affect the text that it surrounds.

In XHTML 2.0, you'll be allowed to add an href to *anything*... but that'll be quite a while.

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 09-13-2002 02:16

Nice page, Doc.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 09-15-2002 07:27

There are a few disadvantages when you don't use <A> tags to create links...

The most important disadvantage is that most search engines won't index your site correctly (they won't find any links).

Another disadvantage is that your visitors won't be able to use shift+click to open links in new windows and won't have the appropriate context menu (with options to open in new window and similar) shown when they right-click...


« BackwardsOnwards »

Show Forum Drop Down Menu