Jump to content

Archived

This topic is now archived and is closed to further replies.

Guest D1proball

HUGE space between the top and first page content

Recommended Posts

Guest D1proball
Okay so for some reason this huge blank space is appearing before my content appears. You can check it out here. [a href=\"http://www.acadvocates.com/itemsearch3.php\" target=\"_blank\"]http://www.acadvocates.com/itemsearch3.php[/a]


Here's the code...I left out the connection part on purpose.

[code]$result = mysql_query($query) or die("Error: " . mysql_error());



$i = 0;
$num = 3;

// Start the code for our table
echo "<center><table width=\"100%\" border=\"1\">";
echo "<tr>";

// Loop through our results
while ($row = mysql_fetch_assoc($result)) {
    // If our count is at zero, this is the first row
    if ($i==0) {echo "<table border=\"1\" width=\"95%\"><tr>";}
    // If our count is higher than zero, and the modulus of our count
    // and our number of columns is equal to zero, we have reached
    // our last column, so close the previous and open a new one
    if (($i > 0) && ($i % $num == 0)) {echo "</tr><tr><br>";}
    // If we are in the middle of a coumn, insert a cell
print"   <td><table width=\"100%\" height=\"100%\" border=\"1\">
        <tr>
          <td width=\"7%\" rowspan=\"3\"><img src=\"/images/accessories/$row[mage]\" width=\"95\" height=\"85\"></td>
          <td width=\"93%\" height=\"29\">$row[name]</td>
        </tr>
        <tr>
          <td height=\"31\">$row[price]</td>
        </tr>
        <tr>
          <td>$row[origin]</td>
        </tr>
      </table></td>";


    // Increment our count
    $i++;
}

// Fill in any empty cells on our last row
while ($i % $num) {
    echo "<td>&nbsp;</td>";
    $i++;
}

// Finish our tables code
echo "</tr>";
echo "</table>";

?>[/code]

Share this post


Link to post
Share on other sites
I think maybe this:
[code]
<center><table border="1" width="100%"><tbody><tr></tr></tbody></table><br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <br>   <table border="1" width="95%"><tbody><tr>   <td><table border="1" height="100%" width="100%">
[/code]
may have something to do with it...

Share this post


Link to post
Share on other sites
I think you should have a long hard look at your html!!!!

There is not even a start and end html tag!!!!!

Once you have something near a valid html file then worry why it doesn't look exactly how u want.

Share this post


Link to post
Share on other sites
I think you have a bit oF redundant code here. You dont really need the outer enclosing <table> tags. I removed them - go the same effect and no white space:

[code]
<center>
        <table border="1" width="95%">
            <tr>
                   <td>
                    <table width="100%" height="100%" border="1">
                            <tr>
                                 <td width="7%" rowspan="3"><img src="/images/accessories/" width="95"

                                        height="85"></td>
                                <td width="93%" height="29">White Cap</td>
                            </tr>
                            <tr>
                              <td height="31">160</td>
                            </tr>
                            <tr>
                                  <td>Able Sisters</td>
                            </tr>
                          </table>
                </td>
                <td>
                    <table width="100%" height="100%" border="1">
                            <tr>
                                    <td width="7%" rowspan="3"><img src="/images/accessories/"         

                                width="95" height="85"></td>
                                  <td width="93%" height="29">Red Cap</td>
                            </tr>
                            <tr>
                                  <td height="31">160</td>
                            </tr>
                            <tr>
                                  <td>Able Sisters</td>
                        </tr>
                          </table>
                </td>
                <td>
                    <table width="100%" height="100%" border="1">
                            <tr>
                                  <td width="7%" rowspan="3"><img src="/images/accessories/" width="95"

                            height="85"></td>
                                  <td width="93%" height="29">Yellow Cap</td>
                            </tr>
                            <tr>
                                  <td height="31">160</td>
                            </tr>
                            <tr>
                                  <td>Able Sisters</td>
                            </tr>
                          </table>
                </td>
            </table>
<center>
[/code]

Share this post


Link to post
Share on other sites
Guest D1proball
[!--quoteo(post=359488:date=Mar 28 2006, 07:40 PM:name=ToonMariner)--][div class=\'quotetop\']QUOTE(ToonMariner @ Mar 28 2006, 07:40 PM) [snapback]359488[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I think you should have a long hard look at your html!!!!

There is not even a start and end html tag!!!!!

Once you have something near a valid html file then worry why it doesn't look exactly how u want.
[/quote]


Hey bud thanks for the nice comment there, but yeah I use php includes to include my templates which have the <html> <head> etc.. and i tried it earlier with those included and it didnt work.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.