admin管理员组

文章数量:1291324

i am using fancybox for displaying certain pages on my website. my problem is that i have no idea how i can make it with a fixed height and to scroll down to view more content if necessary (if the content flows down more than the specific height parameter of the fancybox)

here are my parameters in the page:

<script>
$(document).ready(function() {
    $(".fancybox_link").fancybox({
    'width'             : 680,
    'height'            : 550,
    'autoScale'         : false,
    'autoDimensions'    : false,
    'scrolling'         : 'no',
    'transitionIn'      : 'none',
    'transitionOut'     : 'none',
    'type'              : 'iframe'
    });
});
</script>

what should i do to make the content flow with a scroll bar for the height? thank you.

i am using fancybox for displaying certain pages on my website. my problem is that i have no idea how i can make it with a fixed height and to scroll down to view more content if necessary (if the content flows down more than the specific height parameter of the fancybox)

here are my parameters in the page:

<script>
$(document).ready(function() {
    $(".fancybox_link").fancybox({
    'width'             : 680,
    'height'            : 550,
    'autoScale'         : false,
    'autoDimensions'    : false,
    'scrolling'         : 'no',
    'transitionIn'      : 'none',
    'transitionOut'     : 'none',
    'type'              : 'iframe'
    });
});
</script>

what should i do to make the content flow with a scroll bar for the height? thank you.

Share Improve this question asked Apr 5, 2012 at 14:35 danadana 5,22821 gold badges76 silver badges118 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 3

Edit : Is it the "Scrolling : 'yes'" parameter that doesn't work ?

Otherwise, I think, you can to edit/overwrite the Fancybox CSS :

#fancybox-content {
    height: 680px;
    width: 550px;
    padding: 0;
    margin: 0;
    overflow: scroll;
}

Or something like this. I've do that for a previous project, but don't have the code under the hand to give you the exact syntax.

You actually need to set the option

'scrolling' : 'yes',

That will create scroll bars inside fancybox so you can browse long content.

Try with:

'autoSize' : false

本文标签: javascriptJquery Fancybox heightscroll downStack Overflow