When I use the Fancybox 2 jquery plugin, a margin-right of 23px gets added (width of scrollbar).
Here's the website (click on the Site Map button): http://kevinlouisdesign.com/projects/Canu/web/
What I don't like is that it makes the content jump to the left when the fancybox shows up. I'd like to get rid of this margin-right style.
It's a CSS
fix. On the .fancybox-lock
style, get rid of the overflow-y: scroll
, so the style that looks like this:
.fancybox-lock .fancybox-overlay {
overflow: auto;
overflow-y: scroll;
}
Should instead look like this:
.fancybox-lock .fancybox-overlay {
overflow: auto;
}
This will handle it for you.
来源:https://stackoverflow.com/questions/12902531/jquery-fancybox-2-adds-a-margin-right