Closed Bug 142197 Opened 22 years ago Closed 21 years ago

[quirks] text-align: justify stretches lines between <hr> tags horribly

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: taralx, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(3 files, 1 obsolete file)

Specifying text-align: justify on a block containing only one line of text
causes it to stretch horribly. See URL for an example. (Gecko 20020421)
I don't see any text with 'text-align: justify' on that page.  It works fine for
me on http://www.people.fas.harvard.edu/~dbaron/sat/na/ .  Do you have a URL?
1) What do you call ".bodytext { text-align: justify }" in the stylesheet then?

2) Your page's blocks all wrap. This is only applicable to blocks which are
short enough not to wrap.
I see ".bodytext { }" in the stylesheet, which might explain why I don't see any
justified text.
> 1) What do you call ".bodytext { text-align: justify }" in the stylesheet then?

The sheet currently has ".bodytext {}"

> This is only applicable to blocks which are short enough not to wrap.

Testcase like this attached.... and it worksforme (linux trunk build
2002-05-03-21).  Are you seeing the problem on that testcase?  Because I'm not
seeing any problems on the site you mention.....
Okay, it has something to do with <hr> tags. This breaks:

<body>
<div style="text-align: justify"><p>
    <hr />
    this is some stretched text
    <hr />
</p></div>
</body>
Attachment #82332 - Attachment is obsolete: true
This happens because the page is in quirks mode (see
http://www.mozilla.org/docs/web-developer/quirks/).  In quirks mode, <hr> is an
inline tag, for compatibility with IE/NS4.  So it's just treated as part of the
line.  This leads to what you can see in attachment 82340 [details]....  There are
linebreaks before/after the <hr> tags and so the text between them, being
justified, has to stretch the full width of the window.

Just putting the between the <hr> tags in a <p> would solve the problem (then
the <hr>s would not be in the same line as the rest of the text).  Putting the
page in standards mode would also help, since a standards mode <hr> is a block,
not an inline...  I'm not sure how we can keep <hr> an inline for compat but not
have it produce this effect...

To layout.
Assignee: dbaron → attinasi
Status: UNCONFIRMED → NEW
Component: Style System → Layout
Ever confirmed: true
QA Contact: ian → petersen
Summary: text-align: justify stretches lines horribly → [quirks] text-align: justify stretches lines between <hr> tags horribly
So somehow the forced break from "\A" in generated content isn't changing our
record of the reason the line broke (I forget the term we use...).
Priority: -- → P3
Target Milestone: --- → Future
Changing to All/All. I suppose this is on hold for now...
OS: Linux → All
Hardware: PC → All
I think you solved now.
-> other@layout.bugs
Assignee: attinasi → other
Keywords: testcase
Priority: P3 → --
.
QA Contact: cpetersen0953 → ian
Target Milestone: Future → ---
Depends on: 38370
This appears to work now, probably following the work on bug 38370. Marking as
WFM following verification in recent nightly (2003081304). (Continuing sweep of
old <hr> bugs...)
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: