Closed Bug 296497 Opened 19 years ago Closed 19 years ago

Background doesn't render when element was *initially* out of view

Categories

(Core :: Layout, defect)

1.7 Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 201897

People

(Reporter: Lhunath, Unassigned)

References

()

Details

(Whiteboard: INVALID)

User-Agent: Opera/8.0 (X11; Linux i686; U; en) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050530 span { position: relative; } div { position: absolute; background: red; right: 0; margin-right: 75%; } <span><div>I have only partially filled background</div></span> Reproducible: Always Steps to Reproduce: 1. Make a relatively positioned element. 2. Insert an absolutely positioned element in it. 3. Make the second element out of view and give it a background. 4. Bring it back into view using the margin property. Actual Results: The background is only partially filled; or not; or completely, this depends on how much of the second element was off the screen before the margin was applied. Expected Results: The whole background should be filled (red).
<span><div>I have only partially filled background</div></span> The code above is placing a block level element inside an in-line element. This is not valid html and should not be displayed as described under expected results.
I'm not sure how "margin-right: 75%" is supposed to bring it back on the screen. The width of the containing block is 0! (unless you have something else on the page that contains the SPAN. And the margin pushes the DIV farther off the screen. Try a trunk build. I think you'll be unpleasantly surprised (AFAICT, the rendering on the trunk is correct and is wrong on the 1.7 branch build you tested). Beyond that the background on the DIV looks fine to me (the little bit that's on the screen). dumping in layout, but please attach an HTML testcase that demonstrates the bug and test with a trunk build.
Assignee: general → nobody
Component: General → Layout
Product: Mozilla Application Suite → Core
QA Contact: general → layout
Whiteboard: INVALID
Version: unspecified → 1.7 Branch
*** This bug has been marked as a duplicate of 201897 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.