This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: align="center"


Scott Chapal wrote:
I am using docbook slides 3.0b1 to generate HTML.

For some reason, I can't get the align="center" to work properly on
imagedata ie.:

      <mediaobject>
	<imageobject>
	  <imagedata
                fileref="./graph.png" format="PNG" align="center"/>
	</imageobject>
      </mediaobject>

Results in the image placement on the left.

But...

		fileref="./graph.png" format="PNG"align="right"/>

works as expected, with image on the right.
What browser are you using to review the output?

The 'align' attribute is deprecated in CSS2. There is a 'text-align' style characteristic, but it's not used for doing what you want to do, i.e. center a block in the browser window or page.

I think these changes will be reflected in the behaviour of "modern" browsers such as IE6 (at least in standards mode) and in Mozilla/Netscape 7, particularly if your DOCTYPE is xhtml.

To center an <img> block (or any other block displayed element) in html or xhtml, you need to do two things:
1. specify the 'width' of the image area with a length or percentage value
2. set the margin-left and margin-right values of the <img> style to "auto"

...edN




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]