steven0lisa / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

Align doesn't work on blocks in table cells #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
*** This issue was imported from http://java.net/jira/browse/XHTMLRENDERER-335

It was reported by jamjim on 01.10.2010 12:37:12 +0200 and last updated in the 
previous bug tracker on 01.10.2010 12:54:03 +0200

Found in
Operating System: All
Platform: All

The priority for this issue at migration was Major.

Original description: 
align works when the td contains an inline and inline-block, but doesn't work on
blocks.  

<table border="1" style="width:300px;border:green solid 1px;">
  <tr>
     <td align="right"><span>"tra-la-la"</span></td>
     <td align="right"><div style="display:inline-block;width:50px;border:red
solid 1px;"/></td>
     <td align="right"><div style="width:50px;border:red solid 1px;"/></td>
  </tr>
</table>

The div in the third cell should be aligned right.

Original issue reported on code.google.com by pdoubl...@gmail.com on 16 Feb 2011 at 9:47

GoogleCodeExporter commented 9 years ago
peterbrant wrote on 01.10.2010 12:54:03 +0200:
Hmm... FS is really a DOM + CSS renderer with some support for XHTML.  That 
mostly works OK, but breaks down here.  We simulate align="right" with text-
align: right which is why it doesn't work for blocks.

To match the XHTML behavior, we'd have to distinguish between the two.  I don't 
think this would be too hard, but it's a little outside the scope of FS.  I'll 
take a look next time I get some FS time though.  I'm not really interested in 
trying to support XHTML proper, but this might easy enough to do that it's 
worth 
doing.

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:47