OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] Aligning table content in xhtml output


Hi Manuel,
I checked in fixes for variablelist, qandaset, and calloutlist yesterday, but I was having trouble with normal tables. I've been experimenting with css along the lines you suggested. Doing "td p {margin-top: 0;}" can have unwanted consequenses when you nest admonitions in paras, for example, but I'm finding that the following works for the most part:

td, th {	
	vertical-align: top;
	}
td>p, th>p{
	margin-top: 0;
	}

But let's say I have docbook that produces this:

<tr>
<th align="center" valign="middle">Test</th>
<th align="center" valign="middle">
  <p>Test in a para</p>
</th>
</tr>

In this situation (given that I also have some css to handle vertical alignment: *[valign="middle"]{vertical-align: middle;}), the entry with the para isn't vertically aligned. So if I add this rule:

td[valign]>p, th[valign]>p{
	margin-top: 1em;
	}

Things are fine in firefox, but in IE, they're not aligned. I guess it will just be a limitation that you can't use paras in thead/entrys if you want to use valign. 

Also, it still doesn't handle this situation (the lack of a top margin on the resulting <p> element removes any space between "Text" and "Another para"), but I can live with that: 

<entry>Text
  <para>Another para</para>
</entry>

I'll try this css for a while and see if I find any other unwanted side effects or unhandled cases.

Thanks,
David

> -----Original Message-----
> From: M.Canales.es [mailto:macana@macana-es.com] 
> Sent: Thursday, June 07, 2007 1:01 PM
> To: docbook-apps@lists.oasis-open.org
> Subject: Re: [docbook-apps] Aligning table content in xhtml output
> 
> El Jueves, 7 de Junio de 2007 01:02, David Cramer (Tech Pubs) 
> escribió:
> 
> >
> > 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.
> 
> Looks like you fixed that on the current snaspshot.
> 
> For that folks not using the snapshot tarball, this CSS snip 
> fix the alignament on variablelist-as-table:
>  
> .variablelist td {
>   vertical-align: top;
> }
> 
> .variablelist td p {
>   margin-top: 0;
> }
> 
> 
> --
> Manuel Canales Esparcia
> Usuario de LFS nº2886:       http://www.linuxfromscratch.org
> LFS en castellano: http://www.escomposlinux.org/lfs-es 
> http://www.lfs-es.info
> TLDP-ES:                           http://es.tldp.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: 
> docbook-apps-help@lists.oasis-open.org
> 
> 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]