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

  • SEARCH
  • Home
  • 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 6877037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:33:06+00:00 2026-05-27T04:33:06+00:00

I have a table cell in which i have to set a background image,

  • 0

I have a table cell in which i have to set a background image, the background image i have basically contains 3 parts 1st is the top part (which comes out fine) 2nd is the bottom part which also appears fine and the 3rd that is the middle portion is a sprite which has a height of 57px.
This image(3rd) can be repeated in the x direction but i need to somehow stretch it in Y direction.
In firefox this image fits perfectly using the background-size:contain property but this property does not work for IE.

So I’m setting the cell height to 57px (which is the height of the image) and repeating the image only in x direction. The HTML i have looks something like this:

<table>
     <tr>
        <td>
               <ul>    //for some reason i'm using li tags for setting the images
                  <li class="img1"></li>
                  <li class="img3"></li> //the middle img which is creating the problem
                  <li class="img2"></li>
               </ul>
         </td>
    </tr>
</table>

Here is the css i have written for the class "img3"

.img3 {
        background-image: url("../images/PictorialViewBoxes/Blue_Middle.jpg");
        list-style: none;
        color: #FFFFFF;
        font-size: 16px;
        font-weight: Bolder;
        text-align: center;
        width: 160px;
        word-wrap: normal;
        text-transform: capitalize;
        cursor: pointer;
        padding-left:10px;
        padding-right:10px;
        min-height: 57px;
        max-height: 57px;
        font-family: arial;
        background-repeat:repeat-x;
        overflow-y:hidden;
        }

The height of the cell containing these background images is ‘auto’ Now this works fine is all browsers even IE8 but not in IE7 here is the result in IE8 and IE7 :-

Output in IE8 Output in IE7

I don’t understand why this white gap is coming in IE7!!

Link to JSFiddle: https://jsfiddle.net/qYNAD/8/

img1
img3
img2

  • 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-27T04:33:07+00:00Added an answer on May 27, 2026 at 4:33 am

    Here’s your fix:

    ul {
        overflow: hidden;
    }
    
    li {
        clear:both;
        float:left;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table cell for which I set its contentView to a custom
I have a custom table cell which contains a number of UILabels. At runtime,
I have a table where i want to change cell background on mouse over
What I have? I have a simple web part which has a Table .
I have a table where the columns have a different background set by a
I have a list to which I've applied diplay:table-cell and vertical-align:middle styles to display
I have a nib-based table view cell which I created in Interface builder. I
I have large URL(without spaces) in one of my Table(html table element) cell which
I have a grouped tableview which I set its background like this in viewDidload;
I have a table with 150x150 cells which each have a colored background and

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.