tao52525 / simplemodal

Automatically exported from code.google.com/p/simplemodal
0 stars 0 forks source link

autoPosition option #80

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'd like modal box NOT always stay on center of the page, I mean when I scroll 
down the page, I'd like the modal to disapear with the top content of the page. 
I've tried to set the autoPosition option to false, but when I do, the modal 
box doesn't appear at all...even if I define the top and left position. 
I didn't found anything about autoPosition issue, so I probably don't use this 
option as it should...?

I work with latest jquery (1.7.1.min), and latest simplemodal (1.4.2.min), with 
Chrome browser.

(sorry for the english, I'm french...Hope to be understandable)
Thanks

Original issue reported on code.google.com by truemist...@gmail.com on 7 Mar 2012 at 11:55

GoogleCodeExporter commented 8 years ago
autoPosition has a different purpose - have you tried the "fixed" option?

$(element).modal({fixed: false});

Original comment by emartin24 on 7 Mar 2012 at 2:29

GoogleCodeExporter commented 8 years ago
Thanks for the answer, I've tried it and it works perfectly !
During this time, I did found an other solution, by adding this :
containerCss: {position:"absolute"}

Would you recommend a "better" solution between those 2 ?

I've got an ultimate problem I can't resolve, but I'm not sure it's possible to 
do : when browser window is smaller than the modal's height, it automatically 
add a scroll bar on the right side of the modal ; even if I indicate minWidth 
and minHeight values. I would like this type of behavior : if the modal is 
bigger than the window height, don't add a scrollbar inside the modal, and it's 
the window scrollbar which is used to see the bottom of modal content. 
Maybe it's inherent to the browser and can't do nothing about it ?
Hope my explications are ok.
Thanks.

Marie

Original comment by truemist...@gmail.com on 7 Mar 2012 at 4:18