R?my Bruch wrote:
> Can i align a picture or a table (when the size isn't 100%) with the css  ?
> It's always align on the center of my page for the picture and on the left 
> for the table. 
> picture {
>     text-align : concatenate(attr(align));
>     content: image(attr(path), attr(width), attr(height));
> }

In XXE, paragraphs and tables always occupy the full width of the 
document view (less margin-left/margin-right).
* because it is more comfortable for the author to type some text in 
wide table cells;
* because the ``page'' layout algorithm is quicker this way.

But you can  align images horizontally this way:

talign.css:
---
root {
     display: block;
}

para {
     display: block;
     text-align : concatenate(attr(align));
     margin-top: 1.33ex;
     margin-bottom: 1.33;
}

picture {
     display: inline;
     content: image(attr(path), attr(width), attr(height));
     margin-top: 10px;
     margin-bottom: 10px;
}
---

talign.xml:
---
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/css" href="talign.css"?>
<root>
   <para align="left">
     <picture path="pixware.gif" width="92" height="25"/>
   </para>
   <para align="right">
     <picture path="pixware.gif" width="92" height="25"/>
   </para>
   <para align="center">
     <picture path="pixware.gif" width="92" height="25"/>
   </para>
</root>
---

This trick will also work with tables,
* if you put them inside a block such as the above <para>
* and if their CSS display is inline-table (and not table).



Reply via email to