php spacing issue,solve it please

mjcason

Limp Gawd
Joined
Feb 20, 2004
Messages
332
for the life of me i cannot get the space around the quotes for the two recent articles to be normal. It is about 4 times what it should be, the funny thing is when the page is html it works normal, but in when i switch it back to php it expands agian. take a look and lmk if you know how i can fix it.


http://overclockinghq.com/

my code is messy dont flame
 
Hmm... well, there's no reason your output method would affect rendering. You should compare the HTML version with PHP's output and see where the differences are.

My gut feeling is that the combination of convoluted table layout plus forced dimensions is what's messing things up.

Also, that's seriously ugly markup to try to fix by hand. Do you have a template page that can reproduce the behavior but with less content?
 
Lol like all the empty tags. Gotta fix them. I donno if this is what you want or not it the body section of the source before anything has been parced. lmk if you needed something else. ty.

Code:
<div align="center"> 
  <table width="741" border="0" cellpadding="0" cellspacing="0">
    <!--DWLayoutTable-->
    <tbody>
      <tr> 
        <td height="100" colspan="6" valign="top"> 
          <?php include("header.html"); ?>
        </td>
        <td width="1"></td>
      </tr>
      <tr> 
        <td height="25" colspan="6" valign="top"> 
          <?php include("top_menu.html"); ?>
        </td>
      </tr>
      <tr> 
        <td width="100" rowspan="4" valign="top"> 
          <?php include("login.html"); ?>
          <br> 
          <?php include("recent.html"); ?>
          <br> 
          <?php include("links.html"); ?>
        </td>
        <td width="260" height="122" colspan="2" align="center" valign="top"> 
          <p align="center"><a href="articles/removeicqads.php"><img src="images/menu/recent_articles/3.gif" width="100" height="100" border="0"></a><br>
            <strong><a href="articles/removeicqads.php">Remove Those Pesky ICQ 
            ads</a></strong></p></td>
        <td width="260" height="122" colspan="2" align="center" valign="top"> 
          <p align="center"><a href="articles/bootscreen.php"><img src="images/menu/recent_articles/4.gif" width="100" height="100" border="0"></a><br>
            <strong><a href="articles/bootscreen.php">Boot off That Boot Screen</a><br>
            </strong></p></td>
        <td width="120" rowspan="4" valign="top"> 
          <?php include("google.html"); ?>
        </td>
      </tr>
      <tr> 
        <td width="260" height="128" colspan="2" align="center" valign="middle"> 
          <blockquote> <em><font size="2">&quot;Many of you may find the ICQ welcome 
            screen annoying. Maybe those flashy ads at that the top of your buddy 
            list. And have you ever used that google search bar? They even have 
            the nerve to stick a huge banner in every message dialog window...&quot;</font></em> 
          </blockquote></td>
        <td width="260" height="128" colspan="2" align="center" valign="middle"> 
          <blockquote> <em><font size="2">&quot;Ok, let&#8217;s face it. We&#8217;re 
            not proud that we are using a Windows operating system. So why do 
            we need to see that damn logo 1,000 times. So what are we going to 
            do about it? We&#8217;re going to get rid of those pesky logos one 
            at a time.&quot;</font></em> </blockquote></td>
      </tr>
      <tr> 
        <td width="27" height="60"></td>
        <td colspan="2" align="center" valign="middle"> 
          <?php include("banner.html"); ?>
        </td>
        <td width="25"></td>
      </tr>
      <tr> 
        <td colspan="4" rowspan="2" valign="top"><blockquote> 
            <p> 
              <?php include("phpnews/news.php"); ?>
            </p>
          </blockquote></td>
        <td height="340"></td>
      </tr>
      <tr> 
        <td height="634"></td>
        <td></td>
      </tr>
      <tr> 
        <td height="30">&nbsp;</td>
        <td colspan="4" align="center" valign="middle"> 
          <?php include("bot_menu.html"); ?>
        </td>
        <td>&nbsp;</td>
        <td></td>
      </tr>
      <tr> 
        <td height="100">&nbsp;</td>
        <td colspan="4" align="center" valign="middle"> 
          <?php include("footer.html"); ?>
        </td>
        <td>&nbsp;</td>
        <td></td>
      </tr>
      <tr> 
        <td height="1"></td>
        <td></td>
        <td width="233"></td>
        <td width="235"></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>
    </tbody>
  </table>
</div>
</body>
 
well, glancing through that, your first step needs to be fixing your table. The first one, for instance, has a colspan of 7 in the first row, 6 in the second, and what looks like an instance or two of 5 later on (I get lost in all the colspan+rowspan) You might consider using nested tables instead of both colspan and rowspan if you want to stay with a table layout.

Anyway, that aside, I see what you mean about different output style. Here's my gut feeling:
The layout is too structured and inflexible.
In the first place, you can (and should) safely eliminate the height=whatever directives. let the page flow and fit the content.

However, I think the big issue is with the recent articles, etc, being in the same <tr> as your article summaries. When you mix this with the "valign=middle," your left- and right-side content is stretching the center section. For one thing, you probably want that valign set to "top." However, the larger problem is solved by (a) a <div>-based layout or (b) nested tables. In this case, assuming you want to stick with tables, you really want, after the masthead, a one-row 3-cell table (your 3 columns) each of which contains its own table and independent markup. (really, even, you could just do this in the center column). Make sure your vertical-align is set to top and you should be fine.
 
Back
Top