The display of table headers varies in IE7

I am experiencing an issue with a table that has headers, each containing a span element with a background image serving as a separator between the column headers.

While the display looks correct on most browsers, on IE7 the separator image (which is within a span with a background) appears at the bottom instead of in its intended position.

Works fine on: IE8+, Chrome, Firefox

Issue on: IE7

HTML:

<div class="tableWrapper">
            <table>
                <thead>
                    <tr>
                        <th class="sortable top-left-round"><a href="#" class="sortable">Lead Id</a><span></span></th>
                        <th class="sortable"><a href="#" class="sortable">Create Date</a><span></span></th>
                        <th class="sortable"><a href="#" class="sortable">Target Group</a><span></span></th>
                        <th class="sortable"><a href="#" class="sortable">Activity</a><span></span></th>
                        <th class="sortable"><a href="#" class="sortable">Type</a><span></span></th>
                        <th class="sortable"><a href="#" class="sortable">Last Update</a><span></span></th>
                        <th class="sortable"><a href="#" class="sortable">Close Date</a><span></span></th>
                        <th class="action_header_short top-right-round"><span>View</span></th>
                    </tr>
                </thead>
                <tbody>
                    <tr class="first">
                        <td>1</td>
                        <td class="col_name" title="Jackson">10/12/2011</td>
                        <td title="Jackson">Jackson</td>
                        <td title="Jackson">Jackson </td>
                        <td title="Jackson">Jackson</td>
                        <td title="Jackson">10/12/2011</td>
                        <td title="Jackson">10/12/2011</td>
                        <td class="action"><a href="#" class="view-btn"></a></td>
                    </tr>
                    <tr>
                        <td>1</td>
                        <td class="col_name" title="Jackson">10/12/2011</td>
                        <td title="Jackson">Jackson</td>
                        <td title="Jackson">Jackson </td>
                        <td title="Jackson">Jackson</td>
                        <td title="Jackson">10/12/2011</td>
                        <td title="Jackson">10/12/2011</td>
                        <td class="action"><a href="#" class="view-btn"></a></td>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end .tableWrapper -->
    

CSS:

table{
    width: 890px;           
    margin-left: 25px;  
    border-collapse:collapse;
}
td{
    border: 1px solid #99a3a7;
}
.top-left-round{
        -moz-border-radius-topleft: 5px;
        -moz-border-radius-topright: 0px;
        -moz-border-radius-bottomright: 0px;
        -moz-border-radius-bottomleft: 0px;
        -webkit-border-radius: 5px 0px 0px 0px;
        border-radius: 5px 0px 0px 0px; 
}
.top-right-round{
        -moz-border-radius-topleft: 0px;
        -moz-border-radius-topright: 5px;
        -moz-border-radius-bottomright: 0px;
        -moz-border-radius-bottomleft: 0px;
        -webkit-border-radius: 0px 5px 0px 0px;
        border-radius: 0px 5px 0px 0px;
}
table thead th{ 
        background: url(../images/table-header-bg.png) repeat-x;
        height: 42px;
        line-height: 40px;  
        border: 0px solid transparent;
        font-weight:normal; 
}
th.action_header span { 
        margin-right:50px;
}
th.action_header {
    width: 120px;
    text-align: left;
    padding-left: 20px
}
th.action_header_short{
    padding-left: 20px;
}
th a.sortable,th.action_header span,th.action_header_short span {
        color: #fff;
        font-size: 15px;
        font-weight: normal;
        text-decoration: none;
}
th a.sortable{
        padding: 0 15px;    
        background: url(../images/icons/arrow_dwn.png) right center no-repeat;
}
th.sortable span{   
        background: url(../images/cols-seperator.png) right top no-repeat;
        float:right;
        margin-right: -2px;
        width:5px;
        height: 42px;
}
th a:hover{
        color: #fff;
}

tbody td{
        padding: 0 5px; 
}

td.action{
        width:74px; 
        padding: 2px;
}

.tableWrapper{
        border-bottom: 1px solid #E5E5E5;
        padding-bottom: 8px;
}

Answer №1

It is recommended to apply CSS styling rather than relying on an image for this particular design. Using images can often lead to various problems and inconsistencies.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issues with the alignment of card-footer in Bootstrap 5 card components

Looking to enhance the website for the electronics store I am employed at, I have encountered a challenge while constructing cards using Bootstrap 5. Initially, the cards varied in height until I managed to resolve the issue by setting the card height to 1 ...

Toggle element visibility upon clicking

<table id="selectsupp"> <tr> <td> <select id="category"> <option value="display" readonly="true">-Shop By Category-</option> <option value="all">All</option> <option val ...

Issue with CSS wrapper background not displaying

I am currently working with a layout that looks like this: <div class="contentWrapper"> <div class="left_side"></div> <div class="right_side"></div> </div> The contentWrapper class is styled as follows: .contentWrappe ...

Immutable value of a fixed attribute and the format of the element's date

I have a couple of inquiries regarding the internet TV site I am currently working on. First, I want the main subscription element to have an attribute called (ServerIP) with a fixed value that cannot be changed. However, the code I tried did not work as e ...

What is the best way to enlarge a column contained within a container, allowing an image to spread from the center of the column all the way to the right edge of the page?

I am trying to modify my image within a bootstrap container to extend it to the side while keeping the rest of the layout unchanged. Here is what I currently have: https://i.sstatic.net/Mcukl.jpg. There is a gap on the right side of the image that I want t ...

Issue with PHP redirection not functioning as expected upon submission

Thank you for taking the time to offer assistance. I am encountering an issue with a basic HTML contact form that utilizes a PHP file for processing. The form's method is set to post and it directs its action to a PHP file. Upon completion of the PHP ...

The CSS class name is not having any impact on the React.js components

Struggling with CSS integration in ReactJS? That's the issue I've been facing while working on a project involving Rails and ReactJS. Despite implementing styles in my JSX files, nothing seems to change visually. Take a look at what my App.jsx fi ...

Dimensions of CSS Buttons

On my screen, I have 3 buttons with varying sizes determined by their padding. As the text wraps within each button, they adjust in height accordingly. However, the issue arises when the buttons end up being different heights. Instead of setting a specific ...

Issue encountered when attempting to activate a Vue function in order to update a specific component's field

Let me preface this by saying that I am new to Vue.js and still learning the ropes. Here's what I'm trying to achieve: I have a label and a button. The behavior I want is that when the label is not visible, the button should display "Show Label" ...

A problem encountered in specific JavaScript code

As a newcomer to JavaScript, I have encountered an issue while trying to run this script: <html> <head> <title>Exploring javascript functionalities</title> </head> <body> <p id="demo">I ...

disableDefault not functioning properly post-fadeout, subsequent loading, and fade-in of new content with a different URL into

After extensive searching, I still haven't found a solution to my problem. My task involves bringing in HTML pages into a div element. I managed to make the content fade out, load new href content, and then fade in the new content. However, I'm ...

Attitude: Defiant and Ignoring Authority

So far, no suggestions have been made, indicating that maybe I haven't properly summarized the issue; The problem arises when I absolutely position the section with the class="container" using an additional class or id specific to that <div>. I ...

html input type called array named AmountMap[1] is unable to be configured with <input type="textbox" size="15" name="amountMap[1]" value="0" >

**Having trouble setting the value of an HTML input type named like an array AmountMap[1] <input type="textbox" size="15" name="amountMap[1]" value="0" > When trying to set amountMap[1].value='10', ...

Words are cut off in a random manner on the entry content list for phone users

I struggle with CSS and have a basic understanding to make adjustments to my website. The issue I am encountering involves the .entry-content ul li elements. On desktop, they display correctly without random word breaks, but on mobile, words are being cut ...

The functionality of the Ajax code is taking an unusually long time

After running my Ajax code, it took a surprising 3 minutes and 15 seconds to load. What could be causing this delay? <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.j ...

Do CSS Stylesheets load asynchronously?

Is there a difference in how stylesheets are loaded via the link tag - asynchronously or synchronously? In my design, I have two stylesheets: mura.css and typography.css. They are loaded within the head section of the page, with typography.css being load ...

Utilizing HTML's multiple input type color feature to save selected colors directly to the database

I am currently using the input type color to select colors for customizing my site. I save the selected color to a database and then retrieve it to apply it to different areas of the site. This works well for a single input type color, but now I have mul ...

Optimal ffmpeg configurations for encoding videos into mp4 and ogg formats for seamless playback on HTML5 platforms

Despite the buzz surrounding it, the HTML5 video tag is facing a minor issue. To ensure cross-browser compatibility, multiple video formats - like mp4 and ogg - need to be included for its use. Unfortunately, I couldn't find optimal settings for each ...

When inserting <img>, unwanted gaps appear between div elements

When I have <img> in the child divs, there is some space between them and a blue stripe appears under the image. How do I make them stack perfectly without any gaps? I am new to HTML and CSS and trying to learn for marketing purposes. Any help or ad ...

Pressing the shortcut key will activate the function specified in ng-click,

I have been searching for a solution to my problem, but I haven't found anything that really helps. What I am looking for is a shortcut within an ng-click directive where there is only an if condition without an else expression. Essentially, I just wa ...