Closed Bug 303594 Opened 15 years ago Closed 14 years ago

min-width + text-align:center broken

Categories

(Core :: Layout: Block and Inline, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: ott, Unassigned)

References

Details

(Keywords: testcase, Whiteboard: [reflow-refactor])

Attachments

(1 file, 1 obsolete file)

620 bytes, text/html
Details
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050723 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050723 Firefox/1.0.6

If .item <= min-width and a parent element has the float attribute the
text-align of .item is broken. Defining text-align for the parent element fixes
it, but this is illegitimate.
It happens with all versions of firefox (including deer park).

Reproducible: Always




!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<style type="text/css">
.container
        {
        float: left;
        text-align: center;
        }

.item{
        float: left;
        min-width: 150px;
        text-align: center;
      background: red;
      }

</style>
</head>

<body>

<div class="container">
   <div class="item">
      <p>center</p>
   </div>
</div>

</body>

</html>
Attached file Reporters testcase (obsolete) —
Component: General → Layout
Keywords: testcase
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.0 Branch
Attached file Testcase
Attachment #191723 - Attachment is obsolete: true
Assignee: nobody → dbaron
Component: Layout → Style System (CSS)
QA Contact: layout → ian
Seing this on trunk as well
Version: 1.0 Branch → Trunk
Sounds like a missing BRS_NEEDRESIZEREFLOW.
Assignee: dbaron → nobody
Component: Style System (CSS) → Layout: Block and Inline
QA Contact: ian → layout.block-and-inline
Whiteboard: [reflow-refactor]
(In reply to comment #4)
> Sounds like a missing BRS_NEEDRESIZEREFLOW.

What does this mean?
I couldn't find a dupe, so confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
i can confirm this is the case for <input type="button"> and <input type="submit"> elements regardless of any floating. (though w3c does not define behaviour for form elements, but that's a get-out excuse IMO).

The reason we "need" this to work is that, my buttons render fine with a pre-set width:75px; as they all only house short text (back,next,save,etc.) but "width" is no good for accesibility if you increase the text size. hence the need for min width on the button widths.
edit: ignore me, my comments are already noted over in bug 201293
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20061208 Minefield/3.0a1 ID:2006120812 [cairo]

Seems fixed by reflow branch landing
Status: NEW → RESOLVED
Closed: 14 years ago
Depends on: reflow-refactor
Resolution: --- → FIXED
Adding in-testsuite? nomination per bz's request in m.d.t.l. Sorry for the bugspam.
Flags: in-testsuite?
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.