简体   繁体   中英

Slimbox centering on whole page, not the window

I was trying to integrate Slimbox into my web page, but couldn't get it to work properly. For some reason, the popup is centered on the whole page, not just its visible part. Here's an example of the situation: here .

I tested it in Firefox and Chrome on Linux and Slimboxes on other web pages look fine. Any idea how to get it working?

Also remember about <!DOCTYPE html> in HTML5 documents. In my case, this turned out to be important in Slimbox 2.05!

So I change the doctype from HTML 4.0 Transitional to XHTML 1.0 Transitional and it works like magic. Does anybody know why? There's something about having a XHTML doctype in Slimbox 1 readme, but they don't mention it in the readme to version 2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM