views:

24

answers:

3

I have a Div tag that for some reason is padding the left side with approx 50px.

The following is the html and mind you nono of the "class" have padding-left"

<body>
        <div class="popHeaderMain" align="center">
            <div class="PopHeader">
            Keller Williams Realty | (704) 602-0271
            </div>
            <div class="popLoginHeader">
                <table>
                    <tr>
                        <td style="font-size:10px;">Username: <input type="text" name="username" /></td>
                        <td style="font-size:10px;">Password: <input type="password" name="password" /></td>
                        <td style="vertical-align:bottom;"><input name="login" type="submit" value="Login" /></td>
                    </tr>
                </table>
            </div>
        </div>

            <!-- ImageReady Slices (backgroundPage.psd) -->
            <div style="padding-top:20px; width:900px;" align="center">
            <table id="Table_01" width="900" height="1200" border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
    <tr>
        <td rowspan="2" style="background-image:url(images/backgroundPage_01.png); background-repeat:no-repeat; width:20px; height:410px;">
      <td rowspan="2" style="padding-top:8px; background-image:url(images/backgroundPage_02.png); background-repeat:no-repeat; height:380px; width:455px;">
        <div style="padding-left:25px; padding-top:0px; font-family:Arial, Helvetica, sans-serif; font-size:18px; font-weight:bold; color:#F0F0F0;">
            Preview House Address
        </div>
        <div style="padding-top:20px; width:450px;">
            <div style="padding-left:10px;">
            <img src="images/GibsonHouse3.jpg" alt="GibsonHouse" border="0" style="width: 437px; height: 300px;"/></div>
        </div>
      </td>
        <td style="padding-top:0px; background-image:url(images/backgroundPage_03.png); background-repeat:no-repeat; width:405px; height:58px;"> 
            <div style="padding-top:0px; padding-left:50px; font-family:Georgia, 'Times New Roman', Times, serif; font-size:14px; heigh:58px;">Preview House 1 out of N of houses in area</div>
        </td>
      <td rowspan="2" style="background-image:url(images/backgroundPage_04.png); background-repeat:no-repeat; width:20px; height:410px;">
    </tr>
    <tr>
        <td style="background-image:url(images/backgroundPage_05.png); background-repeat:no-repeat; width:405px; height:352px;"></td>
    </tr>
    <tr>
        <td style="background-image:url(images/backgroundPage_06.png); background-repeat:no-repeat; width:20px; height:766px;"></td>
        <td colspan="2" style="background-image:url(images/backgroundPage_07.png); background-repeat:no-repeat; width:860px; height:766px;"></td>
        <td style="background-image:url(images/backgroundPage_08.png); background-repeat:no-repeat; width:20px; height:766px;"></td>
    </tr>
    <tr>
        <td style="background-image:url(images/backgroundPage_09.png); background-repeat:no-repeat; width: 20px; height:24px;"></td>
        <td colspan="2" style="background-image:url(images/backgroundPage_10.png); background-repeat:no-repeat; width:860px; height:24px;"></td>
        <td style="background-image:url(images/backgroundPage_11.png); background-repeat:no-repeat; width:20px; height:24px;"></td>
    </tr>
</table>
</div>

Can anyone help me please

A: 

I don't see any anomalous left-padding. There is an empty cell on the left side of your table, 20px wide. Is that what you mean? Try temporarily changing the border attribute of the table to border="1" to get a better idea where the cells are.

For testing in Firefox, I would strongly recommend getting Firebug if you don't have it already. One of many benefits is that as you mouse over the elements in the HTML tab you'll see their padding highlighted.

Tim Goodman
Actually that left side cell has the left border of teh image inside of it. I do have Firebug, however when I mouse over it, the section in question doesn't show any anomolies that I can see.
mattgcon
I can't see the actual image because I just copied your HTML, but "images/GibsonHouse3.jpg" doesn't refer to anything on my machine. Perhaps you could link to an actual test page?
Tim Goodman
A: 

The padding-left phantom was actually being inherited from the body tag. The width was set to 800px instead of 900px.

mattgcon
A: 

Your body tag width is set to 800px. Change it to 900px. :)

Steve