Closed Bug 280228 Opened 20 years ago Closed 18 years ago

Text inside inline fieldset refuses to align to the right

Categories

(Core :: Layout, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: cool-rr, Unassigned)

Details

(Keywords: testcase)

Attachments

(3 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Text (and stuff) inside a Fieldset with "display:inline;" refuses to be aligned to the right. This is in my hebrew right-to-left document. Even if a right-aligned, RTLed div is inside the fieldset and contains the text, the text is still left-aligned. Reproducible: Always Steps to Reproduce: 1. Brew some html. 2. Put a fieldset element, with css property "display" set to "inline". 3. Put some text inside. 4. Now try to align it to right. 5. Behold. 6. Bang your head on the computer screen (optional). Actual Results: Text aligned to the left, as I said. Expected Results: Text aligned to the right. This doesn't happen in IE.
Assignee: bugs → nobody
Component: Preferences → Layout
Product: Firefox → Core
QA Contact: mconnor → layout
Version: unspecified → Trunk
Looks like the right rendering to me... the div is exactly the width of the text, and the text is right-aligned within it. What do you expect the rendering to look like, exactly?
(In reply to comment #3) The text is aligned to the left, and also the box is. Look at the source, and also look at it with IE.
I can't look at the testcase in IE, due to not having IE. But the text is aligned to the right inside the box (put a border on the <div> to see ths), and the <fieldset> tag doesn't have an "align" attribute in HTML, so the fieldset is also being placed in the right spot... whatever IE is doing, it's not following the HTML or CSS spec here. Note also that "display:inline" in IE doesn't mean the same thing as it does in the CSS spec....
Attached image IE rendering
Keywords: testcase
Looks like IE is treating "align" on fieldset the way it's treated on <img>. There's no really good reason to do that...
Demonstrates rendering of a floated fieldset containing block elements vs. DIV.
As you can see above (#8) in a fieldset not displayed as a block and without a fixed width child elements (blocks) seem to not have the correct default width. Works on Safari 2 for me (both child DIVs 100% width). Does not work (second DIV in fieldset has width like inline element) in Firefox 2.0.0.6.
This last testcase is a duplicate of bug 129346. The first testcase got "fixed" (for the text alignment, at least) by bug 300030, I bet.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: