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: Setting alignment of mediaobject in html5


I have a logo that I want to centre on a web page, which is located in a book titlepage. When using the HTML5 stylesheets, the logo is not centred – it is positioned at the left and I can’t find the coding responsible for centring it. I’ve noticed that now the HTML5 stylesheets generate a table around the mediaobject, which has the same width as the mediaobject. The previous XHTML1-1 stylesheets didn’t generate a table around the mediaobject, which made it easy to position the logo using CSS.

Here is the XHTML1-1 output:

<div class="mediaobject" style="text-align: center"><img src="" style="text-align: middle" width="300" alt="alt text for publisher's logo"/></div>

And the HTML5 output:

<div style="text-align: center; " class="mediaobject"><table style="border: 0; border-spacing: 0; padding: 0; width: 300; "><tr><td style="text-align: center; "><img style="text-align: middle; width: 300; " src="" alt="alt text for publisher's logo"/></td></tr></table></div>

The <table> does not have a style attribute for “text-align=center” and is getting its width from the enclosed mediaobject. Why is a table now generated (is this mandatory for HTML5?), and in what template is that generated?

--
Dave Gardiner



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]