too long text inside div ignores alignment rule

RESOLVED INVALID

Status

()

RESOLVED INVALID
7 years ago
7 years ago

People

(Reporter: Peter6, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
Created attachment 608641 [details]
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.

Comment 1

7 years ago
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
Last Resolved: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.