Home

Login / Register

Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.

My Menu

Links

Firefox Displaying a Border on Top of Table. How to Hide that 1px Top Border on Table

Firefox is displaying a strange 1px border on top of table?

You want to hide that 1px border-top in table element in firefox?

I faced this problem a thousand times and searched for a solution but never found anything that worked. But I kept trying out myself and what I get to know was that firefox adds a 1px top-border on each table element no matter I use border="0" attribute in html or add border:none in css.

The solution I found was very simple. in your css file, just add the following anywhere. Better to add it on top because you might need this overridden in some cases so if you add it at the end of css, it will override the code where you needed that top borders.

Following is the code you need to enter in your css file.


table tbody {
border-top:none;
}

That will hide that strange 1px gray border on top of table elements in firefox.

Your rating: None Average: 5 (3 votes)

Post new comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.