Web Design Forum: styling a tr a:hover - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

styling a tr a:hover

#1 User is online   OwenONeill 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 362
  • Joined: 17-June 11
  • Reputation: 26
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 12 January 2012 - 07:00 PM

How would I style the hover on this table here:

http://universitycom...niversity-guide

I want the hover to be light a like blue so you know you are hovering over that line, and also make that whole line a hyperlink, but kind of don't know where to start?

I have tried a few things but It doesn't seem to be working :/
0

#2 User is online   Bomb 

  • Expert
  • PipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 694
  • Joined: 09-October 10
  • Reputation: 88
  • Gender:Male
  • Location:Cheshire, UK
  • Experience:Advanced
  • Area of Expertise:Designer

Posted 12 January 2012 - 07:20 PM

Does this help? Also take a look at this for making the whole tr a hyperlink.

This post has been edited by Bomb: 12 January 2012 - 07:30 PM

0

#3 User is online   BlueDreamer 

  • Web Guru
  • Group: Moderators
  • Posts: 5,804
  • Joined: 23-October 07
  • Reputation: 202
  • Gender:Male
  • Location:Northampton (where?)
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 12 January 2012 - 08:24 PM

If use use a HTML5 doctype then you can sematically make a whole table row a link:

<a href="#">
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
</a>

0

#4 User is online   OwenONeill 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 362
  • Joined: 17-June 11
  • Reputation: 26
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 13 January 2012 - 02:05 PM

View PostBlueDreamer, on 12 January 2012 - 08:24 PM, said:

If use use a HTML5 doctype then you can sematically make a whole table row a link:

<a href="#">
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
</a>



I am using a HTML5 Doctype and I've done that, However, when I apply a class or hover, it doesn't work? What am I missing?

I guess I just style that class? right? Bit confused what to put in the css?
0

#5 User is online   OwenONeill 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 362
  • Joined: 17-June 11
  • Reputation: 26
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 14 January 2012 - 05:51 PM

Polite 'BUMP' :spiteful:

This post has been edited by OwenONeill: 14 January 2012 - 05:51 PM

0

#6 User is offline   Faevilangel 

  • Wordpress Ninja.....
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,166
  • Joined: 11-May 09
  • Reputation: 57
  • Gender:Male
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 14 January 2012 - 06:05 PM

tr:hover {
 background:#000;
}


Will only work on recent browsers (not IE) or you can use jQuery like this
0

#7 User is offline   Samus 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 367
  • Joined: 05-August 11
  • Reputation: 27
  • Gender:Male
  • Location:Hackney, London, UK
  • Experience:Intermediate
  • Area of Expertise:Web Developer

Posted 14 January 2012 - 07:30 PM

<a href="#" class="hover">
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
</a>


CSS
a.hover:hover {color: red;}


???
0

#8 User is online   OwenONeill 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 362
  • Joined: 17-June 11
  • Reputation: 26
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Designer/Coder

Posted 15 January 2012 - 02:26 PM

View PostFaevilangel, on 14 January 2012 - 06:05 PM, said:

tr:hover {
 background:#000;
}


Will only work on recent browsers (not IE) or you can use jQuery like this


I tried this and it didnt work?

View PostSamus, on 14 January 2012 - 07:30 PM, said:

<a href="#" class="hover">
<tr>
<td>Cell</td>
<td>Cell</td>
<td>Cell</td>
</tr>
</a>


CSS
a.hover:hover {color: red;}


???



I also tried this and it didn't work? I thought I was doing something wrong as I had tried both of these before asking again? I had a look online for jquery answers, but it must be able to be done through HTML 5!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users