Center the page around a div
I want to center a div in the document body in jquery.
I have a read more button that shows an extra div when yo开发者_运维知识库u click it, and i want the move the window position to be centered around this div.
Take a look at the ScrollTo plugin. If memory serves correctly, it scrolls using the scrollbars so you don't take a massive performance hit.
Try this:
CSS: Is it possible to get a div that is 100% height, less a top and bottom margin?
精彩评论