Fog Creek Software
Discussion Board




Problems with captions in tables

Hello,

Recently I noticed that the captions of tables are being rendered differently in Mozilla (1.3) and IE (6.0).
In IE the caption appears at the top of the table (which visually looks better and seems "correct"), while in Mozilla it apears at the left.

Looking at the source of the XHTML generated by Fogbuz I found the problem - for exemple in the "Picture of the day" table:

[...]
(caption class="miniReport" align="left")Picture of the day(/caption)
[...]

Notice that the page is setting align="left" which means the caption should be at the left of the table. I tested this snippet with Mozilla and removing the align attribute it renders like IE - on Top. Setting align="top" also works on Mozilla, but because this attribute is deprecated the other solution seems better. Details in the following link:

http://www.w3.org/TR/1999/REC-html401-19991224/struct/tables.html#h-11.2.2

Can you change that for the next version?

Thanks,

LRMS

Luciano R. M. Silva
Wednesday, April 09, 2003

For now, you can just change the function in miniReports.asp to:

Sub SummaryBegin( ByVal sTitle )
%>
    <table border="0" width="100%" cellspacing="0" class="miniReport">
        <caption class="miniReport"><% =sTitle %></caption>
        <tbody>
    
<%
End Sub

I'll add it to the next release.

Michael H. Pryor
Friday, April 11, 2003

*  Recent Topics

*  Fog Creek Home