HighDots Forums  

Re: How can I link entire table cell?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: How can I link entire table cell? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Knud Gert Ellentoft
 
Posts: n/a

Default Re: How can I link entire table cell? - 09-09-2004 , 12:11 PM






michael skrev:

Quote:
Anyone knows if it is possible to make the complete area of a table cell a
link onmousover or by hover?
In other words, I'd like to link, not only the text within the cell, but
the entire cell as well as the text within, to bla.html:
a.link {display: block; width: 100%}
--
Knud


Reply With Quote
  #2  
Old   
Neal
 
Posts: n/a

Default Re: How can I link entire table cell? - 09-09-2004 , 12:54 PM






On Thu, 9 Sep 2004 19:21:55 +0200, michael <nomail (AT) example (DOT) com> wrote:

Quote:
a.link {display: block; width: 100%}
Who wrote this? Please attribute.

I'd style a alone rather than the pseudoclass. I reserve .link .visited
..hover and .active for things which I want to change when these states
exist.

Quote:
Thanks for the tip! Could you however make it a functional example based
on
the below:

table
tr><td> <br><br><a href="bla.html">bla</a><br><br> </td></tr
/table
Don't use <br> so much. Only when you need to break a line
in the middle
like this.

a {display: block; width: 100%; margin: 2em auto;}

<table>
<tr><td><a href="bla.html">bla</a></td></tr>
</table>


Reply With Quote
  #3  
Old   
Neal
 
Posts: n/a

Default Re: How can I link entire table cell? - 09-09-2004 , 03:40 PM



On Thu, 9 Sep 2004 20:53:31 +0200, michael <nomail (AT) example (DOT) com> wrote:

Quote:
Don't use <br> so much. Only when you need to break a line

It was just to fake some spacing above and below the link for a
simplified
example sake, but it isn't going to be used at all on the actual page.
Ok, my example below sets a margin (which probably ought to be padding
instead) to replace that, you can omit that part.

Quote:
like this.

a {display: block; width: 100%; margin: 2em auto;}

How do I get that working with the below code? Sorry, but I've been on
holiday for the last couple of years....
Easy. It's CSS. One choice is to put this in the head element of the
document:

<style type="text/css">
table a {display: block; width: 100%;}
</style>

There are other ways. Check out the CSS tutorial at w3schools.com or at
htmldog.com (ignore the XHTML claptrap there). It'll explain all of this.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.