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)
Core
Layout
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.
Comment 3•22 years ago
|
||
I see ".bodytext { }" in the stylesheet, which might explain why I don't see any justified text.
Comment 5•22 years ago
|
||
> 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>
Comment 7•22 years ago
|
||
Attachment #82332 -
Attachment is obsolete: true
Comment 8•22 years ago
|
||
Comment 9•22 years ago
|
||
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...).
Updated•22 years ago
|
Priority: -- → P3
Target Milestone: --- → Future
Comment 11•22 years ago
|
||
Related to http://bugzilla.mozilla.org/show_bug.cgi?id=62845
Reporter | ||
Comment 12•22 years ago
|
||
Changing to All/All. I suppose this is on hold for now...
OS: Linux → All
Hardware: PC → All
Comment 13•21 years ago
|
||
Comment 14•21 years ago
|
||
I think you solved now.
Comment 15•21 years ago
|
||
-> other@layout.bugs
Comment 17•21 years ago
|
||
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.
Description
•