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

RESOLVED WORKSFORME

Status

()

Firefox
General
RESOLVED WORKSFORME
10 years ago
10 years ago

People

(Reporter: u304681, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments)

552 bytes, text/css
Details
2.56 KB, text/html
Details
4 bytes, application/text
Details
(Reporter)

Description

10 years ago
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.
(Reporter)

Comment 1

10 years ago
Created attachment 311775 [details]
Styles

Styles used to reproduce the bug
(Reporter)

Comment 2

10 years ago
Created attachment 311777 [details]
html content

Sample html content
(Reporter)

Comment 3

10 years ago
Created attachment 311778 [details]
javascript

Dummy javascript file. No actual content.

Comment 5

10 years ago
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
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.