Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2011
    Location
    new york
    Posts
    118
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Getting a TR cell background to light up on hover

    Pretty simple thing I'm trying to do but I can't seem to do it. I'm sure someone here could do this in their sleep, can anyone help out? The link to the actual page is below.

    I'm trying to get the cell that says "JOIN" to lightup when someone hovers over it. By "lightup" i mean do something like

    .something a:hover {background-color:red; font-weight:bold; text-decoration:underline; color:blue;}

    to give it a little spark, but I can't seem to figure out what should go in the "something" part, nothing I do seems to affect it...

    help?


    PHP Code:
        <div class="tbldivside">
        <
    TABLE class=tblAcqSubscriptionside>
    <
    TBODY>
    <
    TR class=even>
    <
    TD class=pricingcell><!-- col_1 --><a href="http://www.website.com/signup/"><DIV class="featureNamejoin">JOIN</DIV></a></TD>
    </
    TR>
    </
    TBODY></TABLE>
    </
    div
    http://goo.gl/wXrBX

  • #2
    New Coder
    Join Date
    Jul 2009
    Posts
    28
    Thanks
    2
    Thanked 3 Times in 3 Posts
    Well, you really shouldn't be using tables to layout links like that. But it looks like you might be dealing with code given to you that can't be directly edited...

    This should do it.

    Code:
    .pricingcell:hover {
        background: red;
    }
    The .pricingcell class is what gives the div its color, so that's what you're changing. Ideally, though, there would be an <li> with a <a href="#"> inside it that you'd control with

    Code:
     .the-class-name a:hover{
       /* stuff */
    }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •