Closed
Bug 91885
Opened 23 years ago
Closed 23 years ago
last <br> inside <p> does not include margin specified in CSS
Categories
(Core :: Layout, defect, P4)
Tracking
()
mozilla0.9.4
People
(Reporter: ldubox-coding101, Assigned: dbaron)
Details
Attachments
(1 file)
701 bytes,
text/html
|
Details |
This problem occurs if <br> is assigned a value for 'margin-top' and/or 'margin- bottom' in a style sheet. When <br> is used within a paragraph (<p>), tt appears to add the margin value to the text before the <br> element. This does not seem logical. I would expect it to add the margin spacing to the text that occurs after the <br> element. Outside <p></p>, the <br> element works as expected. For example; if a paragraph has 3 short lines, with 2 <br> elements separating them, there will be extra space rendered between lines 1 and 2, but not between lines 2 and 3. I will include files to reproduce this.
Reporter | ||
Comment 1•23 years ago
|
||
Assignee | ||
Comment 2•23 years ago
|
||
Hmmm. So should BR be considered a replaced or non-replaced inline element? If the former, then you could argue our behavior is right, although it doesn't make much sense and an alternative would probably be better. If non-replaced, then margins just shouldn't do anything.
Assignee: karnaze → dbaron
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P4
Target Milestone: --- → mozilla0.9.4
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Comment 3•23 years ago
|
||
David, why shouldn't margins apply for a non-replaced inline element? Section 10.6.1 and 10.6.2 at http://www.w3.org/TR/REC-CSS2/visudet.html#Computing_heights_and_margins seems to specify vertical margins exactly the same.
Assignee | ||
Comment 4•23 years ago
|
||
See 10.8 and 10.8.1. Even if they "apply", they don't do anything since the rules for placing non-replaced inline elements are different. Also see http://www.people.fas.harvard.edu/~dbaron/css/2000/01/dibm and http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html#x41
Comment 5•23 years ago
|
||
br is a non-replaced inline element. See bug 38370. In fact I'm going to mark this as a dup. *** This bug has been marked as a duplicate of 38370 ***
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•