Closed Bug 373420 Opened 16 years ago Closed 16 years ago
margin-top of first inline inner content block applies to outer content block
382 bytes, text/html
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:184.108.40.206) Gecko/20070219 Firefox/220.127.116.11 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:18.104.22.168) Gecko/20070219 Firefox/22.214.171.124 CSS property margin-top. Whenever the first inline (not floating/absolute) child block has a margin-top, it is applied to the parent block instead of the child block. Reproducible: Always Steps to Reproduce: 1. Create a <div> or other block-level region 2. Create another <div>, <p> or block level region inside of the first 3. Assign a margin-top (via margin-top or margin in CSS) to the second block region. Actual Results: The top margin is applied to the outer div, not the inner div. This does not occur on any other margins, just margin-top. Expected Results: The inner div would have a margin at the top. This seems to happen on any block regions though I haven't tested them all. This causes the bug: <div> <div style="margin-top: 10px;">Test</div> </div> This is a "work around" that always works: <div> <div style="padding-top: 10px;"><div>Test</div></div> </div> Found in: WinXP x64 SP1 (FF v126.96.36.199, FF v188.8.131.52, Minefield v3.0a3pre 2007-03-09 build) WinXP Pro SP2 (FF v184.108.40.206, FF v220.127.116.11)
You should see a dotted black border surrounding 10px of light blue, 20px of red and 34px of light blue. The bug causes inside the border to have 10px of white (browser default color), 20px of red, 44px of light blue.
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.8 Branch
Please visit bug 358651 comment #c9 for explanations Resolving as DUPLICATE of bug 222059
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.