forcing a scrollbar for fixed element accomodation
i am using the jquery simplemodal plugin,
now i've set it up so that it uses a dynamic height, based on the content within it.
however i've run into a bit of a snag here, it seems that if i make the browser window smaller, it does not accomodate for the height of the simplemodal element, therefore some things within the container are hidden off-sc开发者_如何学Creen.
i've tried adding:
body {
overflow: auto;
}
and this accomplishes nothing. in fact, the body will scroll when resized based on the content of the page, not the simplemodal element height.
is there a way for me to force scrollbars if a fixed element is overflowing?
overflow: scroll
This forces scrollbars to appear, even when not needed.
overflow:scroll;
if you only want it to show for an instance(s), put that in a class you can chain to your simplemodal element.
精彩评论