Height of the modalbox not resizing to content

17 views
Skip to first unread message

Candice VanBibber

unread,
May 22, 2014, 4:53:57 PM5/22/14
to moda...@googlegroups.com
The modalbox is working great but when I have it come from a link on a page, the first time it pops up, the height is not growing to the full height of the content.  So there is content not being able to be seen.  Then if I close the modalbox and click the link again it has the correct height. (except in chrome on an ipad, it never resizes right).
 I'm using grails and I have a view and a layout to control how the modalbox looks. I have tried tweeking things in the CSS and it just doesnt make a difference.  Any thoughts?  Thanks.

Justinas Urbanavicius

unread,
May 23, 2014, 1:30:30 AM5/23/14
to moda...@googlegroups.com
is content in the modalbox loaded with ajax, or is it static?
does it also contain images ? if so it could be that images are not yet loaded, and the browser does not know the correct height and width of img, setting width and height attributes would fix this


On Thu, May 22, 2014 at 11:53 PM, Candice VanBibber <cvanb...@gmail.com> wrote:
The modalbox is working great but when I have it come from a link on a page, the first time it pops up, the height is not growing to the full height of the content.  So there is content not being able to be seen.  Then if I close the modalbox and click the link again it has the correct height. (except in chrome on an ipad, it never resizes right).
 I'm using grails and I have a view and a layout to control how the modalbox looks. I have tried tweeking things in the CSS and it just doesnt make a difference.  Any thoughts?  Thanks.

--
You received this message because you are subscribed to the Google Groups "ModalBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modalbox+u...@googlegroups.com.
To post to this group, send email to moda...@googlegroups.com.
Visit this group at http://groups.google.com/group/modalbox.
For more options, visit https://groups.google.com/d/optout.



--
Justinas

Candice VanBibber

unread,
May 23, 2014, 8:28:36 AM5/23/14
to moda...@googlegroups.com
Hmm, I believe it is static content(Using Grails View and Layout) and I do not think it is loaded with Ajax....There is a logo at the top of the content. ...  So, are you saying to set the width and height of the image might fix it?

Justinas Urbanavicius

unread,
May 23, 2014, 8:41:27 AM5/23/14
to moda...@googlegroups.com
yes it should. as i said, the browser does not know what the image width and height are if it is not loaded yet. so the modalbox cannot resize to content. if you state the width and height it will reserve the space needed as a container
and the content will fit as it should. So as you said if you click againt it show correct height, because the image is already loaded and the browser knows it's dimensions, so the content height does not change.

Candice VanBibber

unread,
May 23, 2014, 10:51:42 AM5/23/14
to moda...@googlegroups.com
Well, i guess its not the image. I tried setting the size in the html, and that didnt fix it, so then i completely removed the image and it still didnt fix it.  Any other ideas??
Thanks

Justinas Urbanavicius

unread,
May 23, 2014, 12:35:29 PM5/23/14
to moda...@googlegroups.com
can you send me link, i could take a look, other man that, there isn't much to go on :)

Candice VanBibber

unread,
May 28, 2014, 10:53:27 AM5/28/14
to moda...@googlegroups.com
Thanks for your assistance. I actually think I got it figured out.  I was trying to put too much html stuff in the view and it was messing the whole page up. I made the view be just the content (left out headers and stuff) and now it is acting properly!
Thanks again
Reply all
Reply to author
Forward
0 new messages