1 (edited by downliner 2006-05-04 10:22)

Topic: [SOLVED] How Can I Have Table Cells Highlight On Hover?

CodeXP made a small style hack that made a table cell change colour when moved over. The link for this is now dead so I wondered if anyone would be able to give me some help on achieving this?

Thanks!

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

in index.php (line:127), and viewforum.php (line:208), add to the end of the TR

 onmouseover="this.className='hover';" onmouseout="this.className='<?php echo $item_status?>';"

than in your <style>_cs.css file add

tr.hover td {background-color:#FFF}  /* changes all the TD's change color in the tr*/
tr.hover td.tc2,tr.hover td.tc3 {background-color:#EEE;} /* changes the middle tds to a different color*/

dont forget to change the colors as needed. smile

3 (edited by downliner 2006-05-04 09:59)

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

Cheers Gizzmo, worked perfect

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

phpbb? man wrong forum wrong site of the world!

Cheers Gizzmo, worked perfect

Last edited by downliner (Today 03:59:31)


--------------------------------------------------------------------------------
www.yorkesofdundee.co.uk

Powered by phpBB and Catering v1.14

This board is bought to you courtesy of:


Yorkes of Dundee - the caterers choice

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

lol I admit I strayed away for a couple of days... my forum is in PUNBB but that is not live yet. As soon as I have it skinned the way I want it I will use the unified convertor and stay the hell away from phpbb in future big_smile

Please take me back haha

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

ok ok...hehehe.. join us at the darkside.. stay away from the lights.
oh by the way what did u use for the shopping cart? hehe giggles..

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

Running Zen Cart for the cart but that sucks so Im ditching it. If you can tell me how to display my PunBB header/footer in my order form I will use that.

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

found an error

your TR's should look like this

<tr<?php if ($item_status != '') echo ' class="'.$item_status.'"'; ?> onmouseover="this.className='<?php echo $item_status?> hover';" onmouseout="this.className='<?php echo $item_status?>';">

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

downliner wrote:

Running Zen Cart for the cart but that sucks so Im ditching it. If you can tell me how to display my PunBB header/footer in my order form I will use that.

# Header:
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
$page_title = pun_htmlspecialchars($pun_config['o_board_title']) . " / Title";
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';

# Footer:
<?php
$footer_style = 'index';
require PUN_ROOT.'footer.php';
?>

10

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

I've added all three code snippets and I'm not getting any color change when mousing over my table panes.

Anything I should look out for to make sure I did it correctly?

I added the code to the bottom of oxygen_cs.css and I added the other code inside of the correct <tr> tags in viewforum.php and in index.php

11

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

nrwilk:
does your tr's lool like the code in post #8. if it does, may we see a link, or could you post the source.

12

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

Gizzmo wrote:

nrwilk:
does your tr's lool like the code in post #8. if it does, may we see a link, or could you post the source.

Oh man, I'm sorry!  I figured it out.  I had put it in the wrong <tr> tag.

But, I have a whole lot of extra themes.  Do you have any advice about how to quickly find which colors I should use for each theme?

13

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

this might not really fit with some styles. but its all up to you.

get the colors from section 1.1 and 1.2 than lower it down or up a bit than paist it in the css code from post #2

14

Re: [SOLVED] How Can I Have Table Cells Highlight On Hover?

Gizzmo wrote:

this might not really fit with some styles. but its all up to you.

get the colors from section 1.1 and 1.2 than lower it down or up a bit than paist it in the css code from post #2

Yeah, that's what I've been doing.

I just thought there'd be an easy trick to it.  Oh well, it's cool. 

Thanks a lot for this.  The effect is so simple, yet it really adds a nice touch to the forum.