javascript - Putting jQuery popup window in the center of page always? -


i got code allows nice pop window when clicked on particular image. brings out larger image gallery made. reason can't appear @ center of user's window, images different sizes, move depending on image shown.

the link at:

http://zeendesign.co.uk/cherrieimogen/cherrieimogen/cherrieimogen/portfolio.html

(the css called reveal.css)

any appreciated. thank you!

you assuming left on container must set 20% , that's script's doing.

try setting left based on (windowwidth-containerwidth)/2.

i.e.:

v = math.floor(($(window).width()-$("#mymodal").outerwidth())/2)+"px"; $("#mymodal").css("left",v); 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -