Closed Bug 738578 Opened 12 years ago Closed 12 years ago

too long text inside div ignores alignment rule

Categories

(Core :: Layout, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: Peter6, Unassigned)

Details

Attachments

(1 file)

Attached file testcase
Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120322 Firefox/14.0a1 ID:20120322031220

open testcase
there are 3 alignments for some text inside a div
if the text is shorter than the div it works as expected
if the text is longer than the div it aligns left, no matter what (horizontal) alignment applied to the div.
I'm seeing the same behavior with other browsers.  Is this supposed to be supported?
http://www.w3.org/TR/CSS21/visuren.html#inline-formatting says:

  When the total width of the inline-level boxes on a line is less than the width of the
  line box containing them, their horizontal distribution within the line box is
  determined by the 'text-align' property.

So text-align only applies when the text on the line is shorter than the width of the line, per spec.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: