PDA

View Full Version : Table row height is messed up...



Quimbly
Mar 27th, 2009, 08:09 PM
Hi everyone,

Please see this page in IE: http://shawnessy.ca/test.php

The height of the top row (not the <TH> row) of the calendar gets messed up. The page looks fine under Firefox.

Basically, I grabbed this calendar from my forum, which on its own, looks fine in IE: http://shawnessy.ca/forums/

Can anyone give me some suggestions as to how to fix this?

timgolding
Mar 28th, 2009, 02:06 AM
Wow thats some messy code. I checked with the w3c validator and it gave 43 errors on your test page and 65 on the forums. 17 errors on your home page. Maybe fix those 17 errors of your code and see if that helps. How did you generate the calender is that a feature that comes with phpBB. Did you just copy and paste the html from the forums perhaps If so you will probably have to steal some of the styling from that to add to your home page. Or have you done that already? Well i inspected the table with firebug. The table head is not the problem thats just the bar along the top and is spanned along 5 cols. The next 1 row makes up the rest of the table becasue the rows are actually tables inisde table. In other words row two has individual tables inside each of its cell the table inside the second colum which is one of the problem blocks had this code in it



<table height="94" width="100%" cellspacing="0" cellpadding="2" valign="top">
<tbody><tr>
<td nowrap="nowrap" height="4" align="center" class="row2"><span class="genmed"><a class="genmed" alt="<b>Friday, Mar 27</b>" href="././calendar_scheduler.php?d=1238137200&amp;fid="><b>Friday, Mar 27</b></a></span></td>
</tr>
<tr valign="top">
<td nowrap="nowrap" class="row1">
<table width="100%" cellspacing="0" cellpadding="0" valign="top">
</table>
</td>
</tr>
</tbody></table>


4 what 4 elephants 4 pixels not sure. The reason I'm not sure is becasue i use CSS for styling. Replace this code with a css style even a style element inside the tag is better than things like height="4". I mean look at the alt tag for the the anchor tag. Alt tags inside anchors?

Heres a list of optional elements for alt tags

target, shape, rev, rel, name, hreflang, href, coords, charset, accesskey, class, dir, id, lang, style, tabindex, [B]title[B], xml:lang

Alt tag is not an allowed element and if it was I'm pretty sure it shouldn't have any html tags inside it like <b>. Maybe they forgot to strip html from the string that generates it. Well basically the point im getting at here is whatever created that calender has got it all wrong. in terms of a fix you look to replace all the cells with height="4" to something else say style="height:12px;" or something see if that works.