Colorbox window open top... how to get it center of current page
Im using colorbox in php page as IFRAME开发者_高级运维.. colorbox popup always open on top of the page.. can i get it to middle of current view.
Thanks;
This is often due to loading colorbox.css
after jquery.colorbox.js
or stems from a bad doctype
. Both jQuery and colorbox.css need to be loaded prior to jquery.colorbox.js. ColorBox should be called or assigned to elements inside of jQuery's ready method, which should be declared after jquery.colorbox.js.
ColorBox requires a valid doctype and rendering in quirks mode is not supported. If you aren't using the HTML5 doctype, make sure you are using the full doctype declaration (with URI) to insure rendering in standards mode.
Unfortunately, this abbreviated doctype renders the document in quirks mode for Internet Explorer:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
The doctype with URI renders in standards mode for all browsers:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
For more information, see A List Apart's primer on doctypes.
Either your javascript code is malformed or your css code is malformed. Something similar has happened to me before using the colorbox library. minor mistake somewhere on your part.
精彩评论