Closed Bug 425170 Opened 16 years ago Closed 16 years ago

Bottom margin from stylesheet collapses (e.g. not inline style) when the styled element contains a "script" element with "src" attribute

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: u304681, Unassigned)

References

()

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

Bottom margin of a div element collapses when it (the div element) contains a script element with a "src" attribute.

If the styles are inline the bug is not triggered.

Reproducible: Always

Steps to Reproduce:
1. Place several elements, say <div class="class-name">..</div> in a document.
2. Add styles say .class-name {margin: 0 0 3em 0} .class-name:last-child {margin-bottom: 0}
3. Add a "script" element with a "src" attribute in the any of the divs to collapse the bottom margin of the element.
Actual Results:  
Margin collapsed.

Expected Results:  
Margin should be preserved.

Tested on FF 2.* (Mac) -- collapses again.
Tested on IE 6 / 7 (WIN), Opera 9.2 (WIN) and Safari (MAC) -- preserves margins.
Attached file Styles
Styles used to reproduce the bug
Attached file html content
Sample html content
Attached file javascript
Dummy javascript file. No actual content.
Ivan, please reopen the bug if it occurs in a recent trunk build.
Firefox 2.x takes only security and crash fixes at this point.

-> WORKSFORME
Status: UNCONFIRMED → RESOLVED
Closed: 16 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: