Closed Bug 681320 Opened 15 years ago Closed 15 years ago

box-shadow goes over the border of a parent element

Categories

(Core :: CSS Parsing and Computation, defect)

7 Branch
x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: thomasbleijendaal, Unassigned)

Details

Attachments

(1 file)

250 bytes, text/html
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:7.0) Gecko/20100101 Firefox/7.0 Build ID: 20110816154714 Steps to reproduce: Create the following elements: <div style="margin: 20px; box-shadow: 0px 0px 100px #fff"></div> inside <div style="border: 5px solid #000"></div> Actual results: The box-shadow is put over the border of the parent. Expected results: The box-shadow should have stopped at the border of the parent and not be put over it.
Attached file testcase —
I'm not sure what problem your seeing. But first, can you reproduce it with this testcase? Is it that the shadow is put ontop of the border or that it goes past it down the page? I've compared this testcase rendering and at least on linux it looks the same.
Component: General → Style System (CSS)
Product: Firefox → Core
QA Contact: general → style-system
Uh I meant to say "I've compared this testcase rendering with other browsers"
This is a better use case: <div style="border: 5px solid #000; margin: 50px;"><div style="margin: 20px; box-shadow: 0px 0px 100px #f00; background: #f00;">Some text</div></div> You can clearly see the glow going outside the parent element. Shouldn't this glow be contained inside the parent element?
Nope. If you want something to prevent the overflow of its children being visible outside of it, you should set overflow:hidden.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: