unsider Posted July 26, 2008 Share Posted July 26, 2008 Clearly I'm trying to hover a background behind the second <tr>, but unfortunately it is not complying, and I can not figure out why. if there are any obvious answers, which i think is what it might be, please let me know, but if you need to see the CSS of the other classes, which you may, let me know. Or anything else, thanks. HOVER CSS div.boxes { background: #FFF; border: 1px; } div.forum:hover { background-color: #EEE; } <div id="idx<?php echo $cat_count ?>"> <h2><span><?php echo htmlspecialchars($cur_forum['cat_name']) ?></span></h2> <div class="box"> <div class="inbox"> <table cellspacing="0"> <tr> <th class="tcl" scope="col"><?php echo $common['Forum'] ?></th> <th class="tc2" scope="col"><?php echo $common['Topics'] ?></th> <th class="tc3" scope="col"><?php echo $common['Posts'] ?></th> <th class="tcr" scope="col"><?php echo $commen['Last post'] ?></th> </tr> <div class="boxes"> <div class="forum"> <tr<?php if ($item_status != '') ?>> <td class="tcl"> <div class="intd"> <div class="<?php echo $icon_type ?>"> <div class="nosize"><?php echo $icon_text ?> </div> </div> <div class="tclcon"> <?php echo $forum_field."\n" ?> </div> </div> </td> <td><?php echo $num_topics ?></td> <td><?php echo $num_posts ?></td> <td class="tcr"><?php echo $last_post ?></td> <div style="clear:both"> </div> </tr> </div> </div> if ($cur_category > 0) echo '</table>'.'</div>'.'</div>'."<br>"; Quote Link to comment https://forums.phpfreaks.com/topic/116676-solved-check-my-css-whats-wrong/ Share on other sites More sharing options...
secoxxx Posted July 26, 2008 Share Posted July 26, 2008 this may not solve it but, you need a before and after basically. div.forum{ background-color: #FFF; } div.forum:hover { background-color: #EEE; } Quote Link to comment https://forums.phpfreaks.com/topic/116676-solved-check-my-css-whats-wrong/#findComment-599897 Share on other sites More sharing options...
unsider Posted July 26, 2008 Author Share Posted July 26, 2008 I guess I should have been more specific, it worked perfectly as it was, but... it's still not displaying correctly inside of the table, if i tested It's really just the placement of the background 'hover' <div class="boxes"> <div class="forum"> test </div> </div> It would work correctly, but inside the table structure it does not. *shrug* Quote Link to comment https://forums.phpfreaks.com/topic/116676-solved-check-my-css-whats-wrong/#findComment-599915 Share on other sites More sharing options...
secoxxx Posted July 26, 2008 Share Posted July 26, 2008 YOu may not want to use tables. that might be the problem, or try td:hover { background-color: #EEE; } Quote Link to comment https://forums.phpfreaks.com/topic/116676-solved-check-my-css-whats-wrong/#findComment-599927 Share on other sites More sharing options...
unsider Posted July 26, 2008 Author Share Posted July 26, 2008 EDIT: thanks I feel incredibly dumb now, I am ultimately going to switch to <div> to match the rest of my content, but this was a quick fix, and tr.forum + example above fixed my problem. AHHH I need a new brain Quote Link to comment https://forums.phpfreaks.com/topic/116676-solved-check-my-css-whats-wrong/#findComment-599930 Share on other sites More sharing options...
secoxxx Posted July 26, 2008 Share Posted July 26, 2008 and it might not even work in all browsers using table hovers. divs are just the way to go now a days Quote Link to comment https://forums.phpfreaks.com/topic/116676-solved-check-my-css-whats-wrong/#findComment-599936 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.