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 467761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:36:51+00:00 2026-05-12T23:36:51+00:00

I have some strange problem with table in Firefox. What I want to create

  • 0

I have some strange problem with table in Firefox.

What I want to create is to create a grid and think border.

Here is the mock up (thanks inkscape).

Mockup http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Mockup.png

Here is my code:

<style>
.mytable { border-collapse: collapse; }

.mytd {
    width : 1.3em;

    border  : 1px solid black;
    padding : 0px;
    margin  : 0px;

    text-align : center;
}

.mytd-top    { border-top:    3px solid black; }
.mytd-bottom { border-bottom: 3px solid black; }
.mytd-left   { border-left:   3px solid black; }
.mytd-right  { border-right:  3px solid black; }
</style>

<table class="mytable">
    <tr><td class="mytd mytd-top    mytd-left">1</td><td class="mytd mytd-top"   >2</td><td class="mytd mytd-top    mytd-right">3</td></tr>
    <tr><td class="mytd             mytd-left">4</td><td class="mytd"            >5</td><td class="mytd             mytd-right">6</td></tr>
    <tr><td class="mytd mytd-bottom mytd-left">7</td><td class="mytd mytd-bottom">8</td><td class="mytd mytd-bottom mytd-right">9</td></tr>
</table>

The above code should give me what I want but it does not. There seems to be problem with border left and right when border-colllapse is colllapse.

The above mode get me:

Img 1 http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Img1.png

No outer border!!!


Notice there are three lines in bold.

The problem seems to be only to left and right and NOT top and bottom.

If the three lines are:

.mytable    { border-collapse: collapse; }
.mytd-left  { }
.mytd-right { }

I get:

Img 2 http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Img2.png

No problem for top and bottom.


If the three lines are:

.mytable    { border-collapse: collapse; }
.mytd-left  { border-left:   3px solid black; }
.mytd-right { }

I get:

Img 3 http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Img3.png

The problem seems to be isolate left and right.


If the three lines are:

.mytable    { }
.mytd-left  { border-left:   3px solid black; }
.mytd-right { border-right:  3px solid black; }

I get:

Img 4 http://dl.dropbox.com/u/1961549/StackOverflow/StrangeTableBorder/Img4.png

Without collapse all border shows as expected.


What is going on here?

Is there a work around? a replacement for collapse?

I only target FF (internal project) so I don’t really care if it work in other browser or not.

Thanks in advance.

  • 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-12T23:36:52+00:00Added an answer on May 12, 2026 at 11:36 pm

    I don’t know why firefox behaves like this, but I just found an easy solution that works in firefox.

    set the table to border-collapse:collapse; as before, give all the cells the usual 1px border (never mind about the left, right and so on, you won’t need it), but wrap all the tr’s into a tbody element and give the tbody element a the 3px border you want. works fine in ff 3.5.

    Simple example:

    <table style="border-collapse:collapse;">
        <tbody style="border:3px solid;">
            <tr>
                <td style="border:1px solid;">a</td>
                <td style="border:1px solid;">b</td>
            </tr>
        </tbody>
    </table>
    

    gives you a table with a 1pc border between the a and the b, and a 3px border around the whole table.

    on a little sidenote, if I understood the css2.1 documents correctly, the tbody element can ONLY have a border style, if the table is set to border-collapse:collapse

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 281k
  • Answers 281k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Using this will cause it to work: <?php $javascript =… May 13, 2026 at 3:54 pm
  • Editorial Team
    Editorial Team added an answer Mapnik uses Cairo, and Cairo can be hardware accelerated with… May 13, 2026 at 3:54 pm
  • Editorial Team
    Editorial Team added an answer I would also like to add that the //TRANSLIT removes… May 13, 2026 at 3:54 pm

Related Questions

I have some servers. Some of them have ips assigned. I want to figure
This is a weird issue. I'm accessing my online database using premiumsofts Navicat for
I'm having a rather strange problem with MySQL. Trying to create a procedure to
i'm running into a strange problem in Microsoft SQL Server 2008. I have a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.