Hi Tom,
If I add your style to my docbook css file, it does center the graphic.

div.mediaobject {
 text-align: center;
}

Is the css stylesheet specified in the 'html.stylesheet' parameter so the reference to it is inserted in the HTML files?

Is the reference getting into the HTML files?

Is the css stylesheet getting to the HTML output directory (that step is not done by the XSL process)?

Do other styles in the CSS files work?

Are there div elements with class="mediaobject" in the HTML output?

Bob Stayton
Sagehill Enterprises
[email protected]


----- Original Message ----- From: "Tom Browder" <[email protected]>
To: <[email protected]>
Sent: Wednesday, July 07, 2010 8:48 AM
Subject: [docbook-apps] Centering Figures in Html With CSS: No Luck!


I have been able to center my figures in pdf successfully using Bob
Stayton's advice in his book.  However, I can't yet get my css style
sheet to center the html output.

I have my figures in DocBook in a chunk like this:

<figure>
 <title>A graphic</title>
 <mediaobject>
   <imageobject role='html'>
     <imagedata
         width='4.5in'
         fileref="./images/dmPlot.png"/>
   </imageobject>
   <imageobject role='fo'>
     <imagedata
         width='4.5in'
         fileref="./images/dmPlot.png"/>
   </imageobject>
 </mediaobject>
</figure>

In my css file I have tried these:

div.mediaobject {
 align: center;
}
div.mediaobject {
 text-align: center;
}

Neither work.  But if I add in my fo file in the mediaobject block
attributes "align='center'", the figure centers nicely.

I have tried to find where DocBook does the translation from css to fo
so I can intervene ("customize") but haven't had much luck.

What am I doing wrong?

Thanks.

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to