Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Template design and Front-End Code

Post Reply
 
Thread Tools
  #1  
Old 02-28-2008, 06:01 PM
oswegan's Avatar
oswegan Offline
pp veteran
 
Join Date: Jan 2008
Location: Lake Oswego, Oregon
Posts: 58
IE 7 Whitespace Bug - Here's how I fixed it

IE 7 has what's called a "Whitespace Bug" that will add hidden whitespace beneath items that are in a table, or in an unordered/ordered list.

The way that it was affecting my site was that it was inserting a tiny amount of whitespace along the bottom of the main photos on my "about" and "gear" pages, which made it look like the photo height was not properly filling up the photo frame outline.

The photos are inserted in tables and the code looked like this:

Code:
<td id="ur" valign="bottom"></td>
</tr>
<tr>
<td id="ml"></td>
<td width="606">
<img src="templates/simplicious/images/gear.jpg" alt="" border="0" />
</td>
<td id="mr" valign="top">
</td>
</tr>
<tr>
<td id="ll" valign="top"></td>
<td id="lm" valign="top">
</td>
<td id="lr" valign="top"></td>
</tr>
I fixed the bug by taking the three lines in red and putting them in one line like this:

Code:
<td id="ur" valign="bottom"></td>
</tr>
<tr>
<td id="ml"></td>
<td width="606"><img src="templates/simplicious/images/gear.jpg" alt="" border="0" /></td>
<td id="mr" valign="top">
</td>
</tr>
<tr>
<td id="ll" valign="top"></td>
<td id="lm" valign="top">
</td>
<td id="lr" valign="top"></td>
</tr>
Apparently this work around will also work to correct "ul" and "li" list items, though I have not had to try this yet.
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 06:28 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs