brown2005 Posted May 17, 2006 Share Posted May 17, 2006 i have while($view_array= mysql_fetch_array($view_query)) { $default_amount = number_format($view_array[adverts_amount], 2, '.', ','); $default_hits = number_format($view_array[adverts_hits]); $default_hits_per = number_format($view_array[adverts_amount] / $view_array[adverts_hits], 2, '.', ','); $default_unique = number_format($view_array[adverts_unique]); $default_unique_per = number_format($view_array[adverts_amount] / $view_array[adverts_unique], 2, '.', ',');echo" <tr> <td width='5' height='25'> </td> <td height='25'><a href='$view_array[adverts_url]' class='blue_bold_none' target='_blan'>$view_array[adverts_url]</a></td> <td class='text'>£ $default_amount</td> <td class='text'>$default_hits</td> <td class='text'>£ $default_hits_per</td> <td class='text'>$default_unique</td> <td class='text'>£ $default_unique_per</td> </tr>";echo" <tr> <td colspan='7'><img src='$config_url/include/images/lines/blue.gif' width='100%' height='3'></td> </tr>"; }but how can i make the <tr></tr> section change to a light grey on hover... so you what records you are looking at? Quote Link to comment https://forums.phpfreaks.com/topic/9856-tr-hover-help-in-with-php/ Share on other sites More sharing options...
kenrbnsn Posted May 17, 2006 Share Posted May 17, 2006 This is NOT a PHP problem, but one for Javascript and/or CSS.Ken Quote Link to comment https://forums.phpfreaks.com/topic/9856-tr-hover-help-in-with-php/#findComment-36603 Share on other sites More sharing options...
obsidian Posted May 17, 2006 Share Posted May 17, 2006 [!--quoteo(post=374655:date=May 17 2006, 10:19 AM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ May 17 2006, 10:19 AM) [snapback]374655[/snapback][/div][div class=\'quotemain\'][!--quotec--]This is NOT a PHP problem, but one for Javascript and/or CSS.Ken[/quote]right... so, to answer the original question, let's approach it from the CSS and JavaScript side: when you echo your row, you need to tell the browser how to deal with a hover. since IE doesn't support the :hover pseudo class for these elements, your best bet is to use a little of both CSS for compliant browsers and JavaScript for IE. basically, you want to create a class to attach to each row as you echo it out that you can then set a :hover color to in CSS. then, you want to create on onmouseover() and onmouseout() event in javascript that will either change the class or background-color directly to suppliment for IE. Quote Link to comment https://forums.phpfreaks.com/topic/9856-tr-hover-help-in-with-php/#findComment-36623 Share on other sites More sharing options...
moberemk Posted May 17, 2006 Share Posted May 17, 2006 I'm still a big fan of [a href=\"http://www.xs4all.nl/~peterned/csshover.html\" target=\"_blank\"]whatever:hover[/a] myself, but Obsidian's method works too. Quote Link to comment https://forums.phpfreaks.com/topic/9856-tr-hover-help-in-with-php/#findComment-36721 Share on other sites More sharing options...
wildteen88 Posted May 17, 2006 Share Posted May 17, 2006 [!--quoteo(post=374777:date=May 17 2006, 09:42 PM:name=moberemk)--][div class=\'quotetop\']QUOTE(moberemk @ May 17 2006, 09:42 PM) [snapback]374777[/snapback][/div][div class=\'quotemain\'][!--quotec--]I'm still a big fan of [a href=\"http://www.xs4all.nl/~peterned/csshover.html\" target=\"_blank\"]whatever:hover[/a] myself, but Ober's method works too.[/quote]Ober? [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /] You mean obsidian right? [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /]Yes you can use the :hover pseudo class howewer :hover doesn't work in IE6 unless you are styling an anchor tag. But things have changed now as IE7 suports :hover on almost any html tag! Quote Link to comment https://forums.phpfreaks.com/topic/9856-tr-hover-help-in-with-php/#findComment-36722 Share on other sites More sharing options...
moberemk Posted May 18, 2006 Share Posted May 18, 2006 Um... yes, of course I did. I definitely didn't edit my post to not make me look stupid... [img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /] Quote Link to comment https://forums.phpfreaks.com/topic/9856-tr-hover-help-in-with-php/#findComment-36775 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.