html - CSS : How to add an absolute div to a scrollable background? -
i add div scrollable background, may find script have here.
i have problem because when add box, it's being drawn window canvas, draw background #wrapper
, , stay in exact spot div being added.
for instance, if click in position (eg. images[0]), drawn around top right corner. however, when started scrolling background, added div stay in same position. div drawn @ images[0] is, , if start scrolling, still drawn @ position of images[0].
in css, tried assigning width 100% #wrapper
below, still doesn't work...
#wrapper{ width: 100%; }
hence, know if problem in js or css...
thank :)))
when place absolute div(s), make sure placing within parent position set relative. can reliably control position of absolute child divs.
there no issue javascript.
simply set position:relative
#wrapper
div. should work expected.
see fiddle: https://jsfiddle.net/davidsekar/38ebkd05/
Comments
Post a Comment