Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

padding IE vs Netscape vs Firefox



4:30 pm on Jun 10, 2004 (gmt 0)

10+ Year Member


working on a site but cannot get proper cell padding in netscpew or firefox. i just use padding: 5px; in my style sheet. also i have set table height to 100% but the obe browsers dont follow it, cutting off where there is no more content.

im sure im missing out on something, anyone able to help?



4:38 pm on Jun 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

what do you mean by proper padding in the table cell?

If you have a width of 150px and padding:5px the width of the table cell will be 160px, annoying as that math is to have to do, can't remember how firefox treats this stuff, because I like to keep good control of layouts I almost always use a div inside of table cells to handle padding issues, works better cross browser and requires no css tweaks.

To get table to height:100% in non ie, html must also be set to height:100%;
like this:
body, html {
and for body padding:
body {


3:14 pm on Jun 12, 2004 (gmt 0)

10+ Year Member


the height properties worked, but as for the padding or margin as it goes in non ie browsers, its not working really, i have set both margin and padding to 5px for a tablecell, but its rendered properly in ie but not on firefox or netscape.

any ideas...?


4:38 pm on Jun 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Please give a code sample.

If you are making a table cell, the math goes like this:

border: padding left: width: padding right: border.

So if you have this:

td#leftNav {
border: 2px solid black;
padding: 10px;
width: 140px;
the table cell will be 164px wide in non quirks mode. See this recent thread [webmasterworld.com], message 33 on how to code for that problem to make the cell display the same in standard w3c box model mode and IE quirks mode.

Note what triggers IE quirks mode too, by the way, no doctype, incorrectly written doctype, and, most annoying, doctype not on the first line of the html page. In some cases on dynamically generated pages it can be very difficult to get the doctype on the first line.


6:14 pm on Jun 12, 2004 (gmt 0)

10+ Year Member


actually my fault,

i had put a space wher eit was not meant to be,,like this

padding:10 px, <---- this was the error..

thanks anyways,,,,



Featured Threads

Hot Threads This Week

Hot Threads This Month