Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7644553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:43:04+00:00 2026-05-31T09:43:04+00:00

Hello and sorry for my bad english! I have a table like this: <table

  • 0

Hello and sorry for my bad english!

I have a table like this:

<table id="mytable">
   <tr class="use">
      <td class="ftd"></td>
      <td></td>
   </tr>
   <tr class="use">
      <td class="ftd"></td>
      <td></td>
   </tr>
   <tr class="use">
      <td class="ftd"></td>
      <td></td>
   </tr>
</table>

and a css code like this:

table#mytable tr.use:hover  {
    background:url("bg/tr_bg.png");
    cursor:pointer;
}

It works fine in the IE8-IE9 and Firefox but in IE7 it set the background(image) not to the “tr” but to both “td”. So it looks like the background-image is repeating-x 2-times.

So Im looking for a jquery solution (for that IE7 “bug”) to set only a background-color to the first “td” when I hover the parent “tr”. I can live with the thing that only the first “td” get a background-color and the second “td” stay blank, cause our website visitors that using IE7 are about 3%.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T09:43:05+00:00Added an answer on May 31, 2026 at 9:43 am

    Having a similar CSS:

    table#mytable tr.use td.tdHovered  {
        background:url("bg/tr_bg.png");
        cursor:pointer;
    }
    
    table#mytable tr.use td.otherTdHovered  {
        background:url("bg/tr_other_bg.png");
        cursor:pointer;
    }
    

    You can use a function like this:

    $("#mytable tr.use").hover(
        function() { 
            $(this).find("td:first").addClass("tdHovered");
            $(this).find("td:last").addClass("otherTdHovered");
        },
        function() { 
            $(this).find("td:first").removeClass("tdHovered");
            $(this).find("td:last").removeClass("otherTdHovered");
        });
    

    UPDATED: to manage the last column bg. This is A WAY, probably not the best. Maybe this approach is better:

    table#mytable tr.use.hovered td  {
        background:url("bg/tr_other_bg.png");
        cursor:pointer;
    }
    
    table#mytable tr.use.hovered td.ftd  {
        background:url("bg/tr_bg.png");
        cursor:pointer;
    }
    

    and js:

    $("#mytable tr.use").hover(
        function() { 
            $(this).addClass("hovered");
        },
        function() { 
            $(this).removeClass("hovered");
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I have like this 2 tables class User public int UserId{get;set;} { ....
first of all sorry by my bad english, Hello i am new in this
Hello (Sorry for my bad English) Is it bad practice to assign object to
First : Appologize for my bad english. Sorry for this newbie software question, but
Hello and sorry I've seen alot of problems like this but no direct answer
Sorry as the question is bit lengthy. I have this string Hello how are
Hello for all people... Sorry for my english, but speak spanish... In this week,
Hello everybody and sorry for the rather confusing question-title. I have a Hibernate Class
Hello First sorry for my english. I have started recently my first project on
First of all hello people, and sorry for my bad English, I'm Brazillian! I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.