jquery - Set background-color/image of an element with scrollHeight -
i have container div has innerdiv in turn has multiple div elements. outermost container div has larger height overflow y-axis. trying give background-color innerdiv style applies partial part of innerdiv, scrollable height not provided background-color .i tried assigning height() scrollheight of innerdiv equal of container div using jquery,but doesn't change anything. there way via css/script.
css divs used :
.box { align-content: flex-start; border: solid 5px gray; display: flex; flex-direction: row; flex-wrap: wrap; margin-left: 50px; max-width: 900px; height: 100%; overflow-y: scroll; } .innerbox { background-color:gray; background-size: cover; margin: 5px; flex-direction: row; display: flex; border: solid 1px gray; flex-wrap: wrap; justify-content: space-between; }
here fiddle link,it appears fine there though not when saved file locally. https://jsfiddle.net/rawatdeepesh/rtcdl9u9/
i'm confused need. if want grey background color extend border add background color .box in addition .innerbox. if that's not you're trying please clarify.
Comments
Post a Comment