On 2012-08-31, Boris Kheyfets wrote:

> [-- Type: text/plain, Encoding: quoted-printable --]

> Oh I am sorry -- I've made a wrong link to screenshoot here's a right one:
> screenshot <http://farm9.staticflickr.com/8434/7879097568_94e652749f_b.jpg>.

> I get no warning or errors, and here's html code

...

> So there's indeed a class="align-bottom" (though I don't see how I would 
> center it also). But it doesn't work. Perphaps one should add the class to 
> css... img.aligh-bottom? td.allign-bottom?

Indeed, there is no CSS rule for align-bottom in Docutils' default style
sheet (html4css1.css). Furthermore, I don't see a way to define a rule
for image.align-bottom, as the valign (top/bottom) property should be
defined for the containing element. This means that the "image" directive
option

  :align: top/bottom
  
does not make sense with HTML output currently. (The reST specs have the
caveat: "The specific behavior depends upon the browser or rendering
software used.")

The desired output can be achieved adding a valign arg to the relevant row
(e.g. via post-processing):

<table border="1" class="docutils">
 <colgroup>
 <col width="48%" />
 <col width="52%" />
 </colgroup>
 <tbody valign="top">
 <tr class="row-odd" valign="bottom">
 <td><img alt="Supercomputer archeticture" class="align-bottom" 
src="_images/SuperCompArch.jpg" style="width: 80%;" /></td>
 <td><img alt="Cluster archeticture" class="align-bottom" 
src="_images/ClustArch.jpg" style="width: 80%;" /></td></tr><tr 
class="row-even"><td>left caption</td><td>right caption</td>
 </tr>
 </tbody>
 </table>

A similar effect should be achievable with 

 <tr class="row-odd align-bottom">
 
and a CSS rule for ``tr.align-bottom``. However, reST does not offer a
way to pass class arguments to table columns, rows, or cells.

If all rows can be bottom (instead of top) aligned, you might give a class
to the whole table and define a rule for ``table.align-bottom tr``.
If all rows in all tables can ... you don't even need a class for the table.
You might need a more specific CSS selector to override the top alginment,
though.

Günter

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to