← Prev in month ← Prev in thread

Aligning table content in xhtml output

From
David Cramer (Tech Pubs) <>
Date
2007-06-06T23:02:44+00:00
ID
Thread
Aligning table content in xhtml output
If I have this in my source:

 

 <row>
   <entry 
colname="col1">Text</entry>
   <entry 
colname="col2">
  <para>Text</para>
   
</entry>
 </row>

 

I'll get this in my html output:

 

 <tr>
   <td>Text</td>
   
<td><p>Text</p></td>
 </tr>

 

If I output xhtml, in Firefox, the text in the two 
cells will not be horizontally aligned. Apparently this is a quirks mode thing 
(if I delete the xhtml doctype from the 
output, the cells do align because I'm 
back in quirks mode). For other reasons, I want to stay out of quirks 
mode. 

 

What's the right thing to do here? I preprocess the docs before passing them to the 
docbook xsls, but writing code that will figure out whether I need to add a 
<para> around the text sounds complicated (you could have 
<entry>Text<itemizedlist>...and various other combinations. I could 
hack the docbook xsls and always put a <p> inside <td>s, but that 
creates ugly xhtml that's hard to style with css.     

 

It seems like others 
should be having this problem too :-)

 

David
← Prev in month ← Prev in thread