diff --git a/src/dom/layout.js b/src/dom/layout.js index 29a982764..cf631652e 100644 --- a/src/dom/layout.js +++ b/src/dom/layout.js @@ -311,7 +311,7 @@ // If not, that means the element's width depends upon the width of // its parent. var parent = element.parentNode, pLayout = $(parent).getLayout(); - + newWidth = pLayout.get('width') - this.get('margin-left') - this.get('border-left') - diff --git a/test/unit/fixtures/dom.css b/test/unit/fixtures/dom.css index 029bf1129..f93a89c2f 100644 --- a/test/unit/fixtures/dom.css +++ b/test/unit/fixtures/dom.css @@ -39,6 +39,10 @@ div.style-test { margin-left: 1px } width: 20em; } +#dimensions-visible { + padding-top: 0.1em; +} + #dimensions-visible-pos-abs, #dimensions-display-none-pos-abs { position: absolute;