<ul align="center"> does not center

RESOLVED INVALID

Status

()

Core
Layout
--
minor
RESOLVED INVALID
5 years ago
5 years ago

People

(Reporter: rocketman1937, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 692490 [details]
Window sreenshot showing problem

Concerning Firefox 17.0.1:

In Wikipedia, the demo page is at my user sandbox: 

"http://en.wikipedia.org/wiki/User:Leonard_G./sandbox"

A centered gallery displays correctly in Safari and Chrome, but is left justified in Firefox. The work-around is to bracket the gallery with additional centering commands.

Safari used to allow viewing of the page source but no longer does so (this should be a feature in Firefox, it is useful), so I cannot show the HTML.

Please contact me when done with the sandbox code.

Here is the wiki markup code:

----- Beginning of demonstration -----

====Following WITHOUT Firefox hack====
<gallery caption="Six alternative proposals in 2004" widths="170px" heights="80px" align="center">
File:SFOBBPropsalsOneOfSix.jpg|'''1:''' Self Anchored Suspension
File:SFOBBPropsalsTwoOfSix.jpg|'''2:''' Modified SAS Concrete Tower
File:SFOBBPropsalsThreeOfSix.jpg|'''3:''' Two-span Asymetrical Cable-stayed (Concrete)
File:SFOBBPropsalsFourOfSix.jpg|'''4:''' Two-span Symmetrical Cable-stayed (Concrete)
File:SFOBBPropsalsFiveOfSix.jpg|'''5:''' Two-tower Three-span Cable-Stayed (Concrete)
File:SFOBBPropsalsSixOfSix.png|'''6:''' Extend the Skyway Bridge to YBI
</gallery>
====Following WITH Firefox hack====
<center><!--HACK! required for gallery content (but not title) centering in Firefox 16 -->
<gallery caption="Six alternative proposals in 2004" widths="170px" heights="80px" align="center">
File:SFOBBPropsalsOneOfSix.jpg|'''1:''' Self Anchored Suspension
File:SFOBBPropsalsTwoOfSix.jpg|'''2:''' Modified SAS Concrete Tower
File:SFOBBPropsalsThreeOfSix.jpg|'''3:''' Two-span Asymetrical Cable-stayed (Concrete)
File:SFOBBPropsalsFourOfSix.jpg|'''4:''' Two-span Symmetrical Cable-stayed (Concrete)
File:SFOBBPropsalsFiveOfSix.jpg|'''5:''' Two-tower Three-span Cable-Stayed (Concrete)
File:SFOBBPropsalsSixOfSix.png|'''6:''' Extend the Skyway Bridge to YBI
</gallery>
</center>


----- End of demonstration -----

- Leonard G.
Reproducible in:
* Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20121214 Firefox/20.0 ID:20121214030827

* Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19 ID:2010031422

* MSIE 10 (Windows 7 x64)

OTH, Opera 12 renders like Chrome 25.
(Reporter)

Comment 2

5 years ago
With the IE being a problem then perhaps this is an issue not for the Firefox maintainers but for the Wiki maintainers. Can someone inside Mozilla handle this? - Leonard G.
(Reporter)

Comment 3

5 years ago
I have reported this to MediaWiki branch - https://bugzilla.wikimedia.org/show_bug.cgi?id=43186, referencing this bug report. - Leonard G.

Updated

5 years ago
Component: General → Layout
Product: Firefox → Core

Comment 4

5 years ago
Reproducible on Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:21.0) Gecko/20130109 Firefox/21.0.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Mac OS X → All
Hardware: x86 → All
The page uses markup like this:

  <ul align="center">
    <li style="display: inline-block">AB</li>
    <li style="display: inline-block">CD</li>
  </ul>

and that centers in WebKit.

But there is no special behavior defined for the "align" attribute on <ul> per spec, either in HTML4 or in HTML5.  So this seems like a WebKit bug to me.  And a MediaWiki one if they're relying on it.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
Summary: HTML rendering (Firefox 17.0.1) → <ul align="center"> does not center
You need to log in before you can comment on or make changes to this bug.