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] Centering Figures in Html With CSS: No Luck!


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
bobs@sagehill.net


----- Original Message ----- 
From: "Tom Browder" <tom.browder@gmail.com>
To: <docbook-apps@lists.oasis-open.org>
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: 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]