|
Change color of whole <tr> on hover.
|
|
09-12-2008, 09:34 PM
(This post was last modified: 09-12-2008 09:37 PM by Grimlok.)
Post: #1
|
|||
|
|||
|
Change color of whole <tr> on hover.
Hi,
I have a rather challenging CSS/template problem, maybe you can help me. I'm going for a table-less, line-less look in my current theme, and so I have to make differentiation by color. Basically, I want to be able to change the color of a whole <tr> when I hover the mouse over it. Pictures will explain the matter better (some of these are too dark too see here on a light background, but on a similarly dark one you can see the hover effect well; also don't mind the forum icons, those will not be in the final theme): This is how my thread listings look like originally. ![]() When you select a thread for moderation, it activates the class '.trow_selected td'. That colors the whole row, like so: ![]() I'd like to emulate that when I mouse over forum and thread listings. Currently, I've defined ':hover' classes for the '.trow1' and '.trow2', Code: .trow1:hover { background: #color; }but the only manages these: ![]() ![]() ![]() ![]() ![]() ![]() ...you get the idea. Not to mention that they do that for all '.trows', whether or not they're forum or thread listings.Like I said, I'd like to do that for the entire row, in just both the forum and thread listings. Anybody that can help me? Note that I've already removed the counters for threads and posts on the index, as well as ratings in thread listings in the templates, so you can opt to leave these out in the consideration. I'd preferably like suggestions for code that'd also work in IE, although that isn't as critical. I'll take all the help I can get!
|
|||
|
09-13-2008, 11:24 PM
Post: #2
|
|||
|
|||
|
RE: Change color of whole <tr> on hover.
I found the answer... mostly.
Code: table tr:hover td {However, now this changes colors for all TRs. I'm still trying to look for what templates hold the forum and thread listings so I can create custom classes for those, and use that custom class in the code instead. If anyone can help me there that'd be great.
|
|||
|
09-14-2008, 07:47 AM
Post: #3
|
|||
|
|||
|
RE: Change color of whole <tr> on hover.
Just make a custom trow class and do a hover, and then edit it wherever you want this new trow color / hover thing to be displayed to the new CSS class!
~FFW FYI: I'm not a sir, dude, or guy. I am a 'miss'.
|
|||
|
09-14-2008, 03:52 PM
Post: #4
|
|||
|
|||
RE: Change color of whole <tr> on hover.
(09-14-2008 07:47 AM)FirefoxWiz Wrote: Just make a custom trow class and do a hover, and then edit it wherever you want this new trow color / hover thing to be displayed to the new CSS class! Yeah, finally worked it out with some help. Here's the solution for those interested. Code: .customhover {Then, just replace all instances of '{$bgcolor}' with 'customhover' in the following templates. forumbit_depth2_cat forumbit_depth2_forum forumdisplay_announcements_announcement forumdisplay_announcements_announcement_modbit forumdisplay_thread forumdisplay_thread_modbit The effect should work without a hitch, except in IE which is a total pain to design for. |
|||
|
03-30-2010, 07:55 PM
(This post was last modified: 04-04-2010 08:37 PM by eOutcast.)
Post: #5
|
|||
|
|||
RE: Change color of whole <tr> on hover.
(09-14-2008 03:52 PM)Grimlok Wrote:(09-14-2008 07:47 AM)FirefoxWiz Wrote: Just make a custom trow class and do a hover, and then edit it wherever you want this new trow color / hover thing to be displayed to the new CSS class! very nice, thank you! _______________ indianapolis web design |
|||
|
05-04-2010, 07:37 AM
Post: #6
|
|||
|
|||
|
RE: Change color of whole <tr> on hover.
thanks for the helpful code
|
|||
|
06-15-2010, 05:39 AM
Post: #7
|
|||
|
|||
|
RE: Change color of whole <tr> on hover.
I think this is very easy! But eOutcast says in detail!
|
|||
|
06-26-2010, 10:14 PM
Post: #8
|
|||
|
|||
|
RE: Change color of whole <tr> on hover.
thx for the code!
|
|||
|
07-01-2010, 03:04 AM
Post: #9
|
|||
|
|||
|
RE: Change color of whole <tr> on hover.
Change color of whole <tr> on hover. does easy?
|
|||
|
« Next Oldest | Next Newest »
|

Search
Member List
Calendar
Help

![[Image: unselectedtb4.jpg]](http://img98.imageshack.us/img98/2223/unselectedtb4.jpg)
![[Image: selectedey1.jpg]](http://img518.imageshack.us/img518/9949/selectedey1.jpg)
![[Image: trow12wa6.jpg]](http://img521.imageshack.us/img521/8497/trow12wa6.jpg)
![[Image: trow13sw2.jpg]](http://img126.imageshack.us/img126/556/trow13sw2.jpg)
![[Image: trow22ab5.jpg]](http://img178.imageshack.us/img178/8530/trow22ab5.jpg)
![[Image: trow23ts5.jpg]](http://img126.imageshack.us/img126/4342/trow23ts5.jpg)
![[Image: trow14ka7.jpg]](http://img178.imageshack.us/img178/8412/trow14ka7.jpg)
![[Image: trow24hp7.jpg]](http://img513.imageshack.us/img513/5885/trow24hp7.jpg)
Not to mention that they do that for all '.trows', whether or not they're forum or thread listings.


