7 replies [Last post]
webphoric
Offline
newbie
new york
Last seen: 9 years 44 weeks ago
new york
Timezone: GMT-5
Joined: 2010-10-28
Posts: 3
Points: 6

I have put up my source code on www.freesdtv.com/a. (right click on mouse for source code). On that page you will find a simple table. The problem is that the cells expand greatly under firefox and there is no padding under ie. I designed my page under ie so I really want there to be no padding in the cells of the table in firefox. I have worked for days to try to make the table stay small but to no avail. Please if there is someone that knows a code to stop the table from expanding under firefox it will help my entire webpage.

P.S. Just to let you know the table that you see is only a small example of a much larger page and when that table expands all you see is white space to the right of it or overlap under it.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 18 hours 5 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9767
Points: 3849

Firefox is doing exactly what

Firefox is doing exactly what you told it.

<table cellspacing="0" 
    cellpadding="1" 
    border="1" 
    style="width: 750px; 
        height: 968px;" 
    class="table">
FF is quite properly proportioning the cell dimensions to fit the table size. Delete the height and width properties. To the table, add {margin: 1em auto;}, and the table will center itself.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

webphoric
Offline
newbie
new york
Last seen: 9 years 44 weeks ago
new york
Timezone: GMT-5
Joined: 2010-10-28
Posts: 3
Points: 6

Hi I am not sure where you

Hi I am not sure where you got that code from Gary. It looks like mine because of the class="table" which I saw on the top of my page but I still am not sure which code that is. Let me now post the code on this page:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
<head>
 
<title>gold scales diamond scales</title>
 
<meta http-equiv="Content-Type" content="text/html: charset=UTF-8"/>
 
 
<style type="text/css">
 
 
table, td, tr { 
margin: 0px; 
padding: 0px;  
} 
 
p.fonty
{
font-size: 15px;
font-family: Arial;
color: windowtext;
}
table.white
{
background-color: white; 
width: 480px;
}
td.colornum2
{
padding: 0px;
background-color: #cccccc;
width: 165px;
}
td.colornum
{
padding: 0px;
background-color: #999999;
width:324px;
}
td.colornum3
{
padding: 0px;
background-color: #cccccc;
width: 165px;
}
 
</style>
</head>
<body> 
<table class="white">
 
 
 
 
 
<tr>
                                        <td style="padding-right: 0px; padding-left: 0px; background: #666666; padding-bottom: 0px; padding-top: 0px;" colspan="2">
                                        <p style="direction: ltr; unicode-bidi: embed; text-align: left;"><span style="color: windowtext; font-family: 'times new roman';"></span></p>
                                        </td>
                                    </tr>
                                    <tr>
 
                                 <td class="colornum"  height="12px;">
 
                                        <p class="fonty" style="direction: ltr; unicode-bidi: embed; text-align: left;">Capacity</p>
 
                                        </td>
 
																				<td rowspan="2"><img src="http://i616.photobucket.com/albums/tt245/foreverlovegifts/love%20forever%20gifts%20website/pic1bannerdiatestdiamondtesteraaaaug2009logo.png" alt="" />
 
</td>
 
                                    </tr>
 
                                    <tr>
 
                                        <td class="colornum3"  height="48px;">
 
                                        <p class="fonty"  style="direction: ltr; unicode-bidi: embed; text-align: center;">20g / 0.7055oz / 0.6430ozt /<br />
 
                                        100ct / 12.860dwt / 308.64gn</p>
 
                                        </td>
 
                                    </tr>
 
                                    <tr>
 
                                        <td  class="colornum" height="48px;">
 
                                        <p class="fonty"  style="direction: ltr; unicode-bidi: embed; text-align: left;">Readability</p>
 
                                        </td>
 
                                        <td class="colornum2"> 
 
                                        <p class="fonty"  style="direction: ltr; unicode-bidi: embed; text-align: center;">0.001g / 0.0001oz / 0.0001ozt /<br />
 
                                        0.005ct / 0.001dwt / 0.002gn</p>
 
                                        </td>
 
                                    </tr>
 
                                    <tr>
 
																	  <td class="colornum" height="12px;">
 
 
 
																				<p class="fonty" style="direction: ltr; unicode-bidi: embed; text-align: left;">Scale Dimensions</p>
 
                                        </td>
 
                                        <td class="colornum2"> 
 
                                        <p class="fonty" style="direction: ltr; unicode-bidi: embed; text-align: center;">3.0 x 5.0 x 0.75"</p>
 
                                        </td>
 
                                    </tr>
 
                                    <tr>
 
                                        <td class="colornum" height="24px;">
 
                                        <p class="fonty" style="direction: ltr; unicode-bidi: embed; text-align: left;">Platform Dimensions</p>
 
                                        </td>
 
                                        <td class="colornum2"> 
 
                                        <p class="fonty" style="direction: ltr; unicode-bidi: embed; text-align: center;">0.7" Diameter (1.3" with tray)</p>
 
                                        </td>
 
                                    </tr>
 
                                    <tr>
 
                                        <td class="colornum" height="12px;"> 
 
                                        <p class="fonty" style="direction: ltr; unicode-bidi: embed; text-align: left;">Warranty</p>
 
                                        </td>
 
                                        <td class="colornum2">
 
                                        <p class="fonty" style="direction: ltr; unicode-bidi: embed; text-align: center;">10 Year Limited Warranty</p>
 
                                        </td>
 
                                    </tr>
 
                                    <tr>
 
                                        <td class="colornum" height="24px;"> 
 
                                        <p class="fonty" style="direction: ltr; unicode-bidi: embed; text-align: left;">Power</p>
 
                                        </td>
 
                                        <td class="colornum2"> 
 
                                        <p class="fonty" style="direction: ltr; unicode-bidi: embed; text-align: center;">2 x AAA Batteries (included)</p>
 
                                        </td>
 
                                    </tr>
 
 
                            </table>
														</body>
														</html>

This is the code of the table that apperas smaller in ie thatn firefox. My table class="white" makes all margins and padding 0px and my td style right under that says padding right and left at zero asnd the it says padding top and bottome at zero (0px;) I have been trying everything I can think of to get rid of the padding in the table.

What should I try next?

Philip

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 18 hours 5 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9767
Points: 3849

In the html, not the stylesheet

It's in the html source. Here it is with some surrounding markup for context, and not reformatted for easier reading.

<div class="centermoz">
 
<table cellspacing="0" cellpadding="1" border="1" style="width: 750px; height: 968px;" class="table">
    <tbody>
        <tr>
            <td align="center"><img alt="free ebook think and grow rich by Napolian hill" src="http://i616.photobucket.com/albums/tt245/foreverlovegifts/love%20forever%20gifts%20website/thinkandgrowrichnapoleonebbok_pic.jpg"/></td>
 

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

webphoric
Offline
newbie
new york
Last seen: 9 years 44 weeks ago
new york
Timezone: GMT-5
Joined: 2010-10-28
Posts: 3
Points: 6

Okay this is what happened. I

Okay this is what happened. I had a problem so I became a member of this site because I have read some of the forums and it seems like a good source site. When I signed up they asked for a website. I gave my main website that I work on (www.loveforevergifts.com), but this is not the website I had the question for. When I asked the question you looked at the home page of that site. My question happens to be for a page on that site but I uploaded the problem to www.freesdtv.com/a. I also put the code above. Here all the margins are at zero and the table still does not close. My issue is not with the left and right centering. The table grows from top to bottom in FF because there is so much padding on the cells which are not there in IE. I prefer they not be there at all.

Philip

webphoric
Offline
newbie
new york
Last seen: 9 years 44 weeks ago
new york
Timezone: GMT-5
Joined: 2010-10-28
Posts: 3
Points: 6

I am still new to this forum.

I am still new to this forum. Please help me become forum compliant. I seemed to have left a post but it did not appera on this forum page. The code which is being discussed about is the wrong code. I would like to show the right code (the one I posted above) so I can have my question about FF and padding answered. Should I make a new post?

Philip

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 18 hours 5 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9767
Points: 3849

I was confused by the link

I was confused by the link going to the wrong page due to the punctuation included. freesdtv.com/a. sends you to a different page from freesdtv.com/a

The extra space is from <p>'s margins. Firefox is doing the right thing, while IE has a long history of screwing up margin collapse. Try p.fonty {margin: 0;}

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

webphoric
Offline
newbie
new york
Last seen: 9 years 44 weeks ago
new york
Timezone: GMT-5
Joined: 2010-10-28
Posts: 3
Points: 6

Wow it works!

Gary:

I am so happy because you located the right place to add the margin: 0;. In the future by the way I will write www.website.com/a . (I will leave a space between the end of the website and the period). Is that how other people usually deal with the end of sentence period not getting confused with the web address? Back to the web page. Because with your help I figured out how to get rid of the margins on that table I was able to cut out 1.5 inches of empty white space under the table. That web page is now my faveorite webpage that I designed so far. I uploaded it to www.freesdtv.com/a . The completed webpage is so nice. I will leave it up for a few days just for you to see and then I will take it down. Only problem with the webpage now is it doesnt read well on screens of 832X624 or less because of the positioning, but I dont care because I figure not a lot of people have those screens and the ones that do are probably pretty used to wondering where the rest of a webpage is located. I am still a little new with positioning but I think that in the future screens might get more varied in size and that maybe they might have to modify positioning so that it is relative to every screen. My feeling is that there should be an absolute standard, say a 17" screen and that EVERY ELEMENT on the page gets smaller or larger proportionatley for smaller and larger computer screens and a completely different system is used for cell phones. Anyway thank you so much Gary for all you have done!

Philip