html - scrollbar covered by inner element with position absolute -


i havent found exact question.

i have page set as

<div id="page">     <div id="chrome">         <div id="element">bla</div>         <div id="content">bla</div>     </div> </div>  #page has position:absolute, , dimensions #chrome has position:static, , overflow:auto #element has position:absolute, right:0, top:0 

#content has large amount of content. scrolls within #chrome, whereas #element stays fixed on #page, without needing position:fixed.

http://jsfiddle.net/pike/x4kshd3f/

in browsers - windows think - #element overlaps top of scrollbar of #chrome.

is correct behaviour ? there way make scrollbar of static #chrome appear on top of absolutely positioned children ?

ps .. there reason why structured this. cant use position:fixed. cant put scrollbars on #page. #chrome has static.

it happens on other browsers/platforms too, , yes, i'm afraid intended behaviour.

element static positioning not create stacking context. #element, has position:absolute, has stacking context. effect #element overlays #chrome, in sense.

what seems solve in edge browsers css

#chrome { isolation:isolate } 

which css candidate 2014-12. , sensible one.

https://developer.mozilla.org/en-us/docs/web/css/isolation

http://dev.w3.org/fxtf/compositing-1/#isolation

there other ways create stacking context, seem interfere absolute positioning of #element, making 'relative' #chrome instead of #page (making scroll along #content instead of staying fixed).

still open better supported solutions - won't accept answer.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -