Eiolon Posted August 14, 2012 Share Posted August 14, 2012 I have a style applied to a table with td set to height:25px. It looks appropriate in Chrome, IE9, Safari but in Firefox it is about 5px too small. Is there anything that I can apply so that Firefox will keep it consistant with the other browsers? If I increase it by 5px it makes the other browsers be 5px too tall. Quote Link to comment Share on other sites More sharing options...
Mahngiel Posted August 14, 2012 Share Posted August 14, 2012 are you applying the height with CSS or table properties? Are you certain there aren't any overriding properties? Quote Link to comment Share on other sites More sharing options...
Christian F. Posted August 14, 2012 Share Posted August 14, 2012 Have you reset all paddings and margins? In other words: Show us the code. Quote Link to comment Share on other sites More sharing options...
Eiolon Posted August 14, 2012 Author Share Posted August 14, 2012 It's literally just the height command being used. This is the full CSS and HTML. No other CSS on the page as I create each element on its own page then when I am happy with how it looks I move it over to the real full page. I haven't even gotten there yet. #dataTable { } #dataTable td { height:25px; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> </style> </head> <body> <table id="dataTable"> <tr> <td>Date</td> <td>Name</td> <td>Phone Number</td> </tr> <tr> <td>DATA HERE</td> <td>DATA HERE</td> <td>DATA HERE</td> </tr> </table> </body> </html> EDIT: Figured I would include the doctype and all that jazz just in case. Quote Link to comment Share on other sites More sharing options...
Christian F. Posted August 14, 2012 Share Posted August 14, 2012 Then your problem stems from the fact that the different browsers have different default values for margins, paddings and so forth. It is highly recommended to reset all of these as the first thing you do, so that you don't encounter issues like this. To reset all paddings and margins, simply add this to the top of your CSS definition: * { margin: 0; padding: 0; } It's not quite a complete solution for all browser-differences, but it's a good start. A search of the web will give you lots more information on this subject. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.