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 3 of 3
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer Table and Cell Borders

    Hi,
    I have a table with a border, and what I'm trying to achieve is having a couple of rows with a different border, or with no border at all.

    The problem is that I couldn't achieve that in IE. In the following example, FF has a blue border all around the second row. In IE, however, the edges of that row, left and right, kept the table's black border. How can I "run over" the table border in IE?
    Code:
    table.tmp
        {
            border-left: 1px solid black;
            border-right: 1px solid black;
            border-collapse: collapse;
            width: 30%;
        }
        table.tmp td
        {
            border-bottom: 1px solid black;
            border-top: 1px solid black;
            width: 50%;
        }
        tr.SomeBorder td
        {
            border: 5px solid blue;
        }
    
    <table class="tmp">
            <tr>
                <td>a</td>
                <td>b</td>
            </tr>
            <tr class="SomeBorder">
                <td>c</td>
                <td>d</td>
            </tr>
        </table>

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,479
    Thanks
    6
    Thanked 981 Times in 954 Posts
    You could not give your entire table a border but all cells in that table. What I mean is that the first cell in each row gets a left border and the last cell gets a right border. The cells in the topmost row would also get a top border etc. This would simulate a border all around the table and you can change the color for certain cells as you like.
    Not very elegant but it should work.

  • #3
    New Coder
    Join Date
    May 2009
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah, I thought about it, but hoped there might be a more elegant solution. But I guess that's just how it goes with IE.
    It does work, thanks.


  •  

    Posting Permissions

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