Modal issue [2.0 wip]
While creating a form inside a modal, i see the forms are not aligned property (they are left aligned), wasnt the case when I was using v1.4. Note - I am running bootstrap 2.0 with 1.4 modal bootstrap-modal.js (did not see a 2.0 modal script)
This is true for both default form style and horizontal.
There is a bootstrap-modal.js. You must have missed it -> https://github.com/twitter/bootstrap/blob/2.0-wip/js/bootstrap-modal.js. Please check with the latest code and post some screenshots so we can see the problem.
Thanks, I updated the modal to 2.0 JS. But now the modal functionality has stopped working completely, no modal popups. I am guessing the doc has changed for modals, dont see the docs on the bs2 website.
This is what I am using currently to invoke the modal -
<a href='#' data-controls-modal='check-help-dialog' data-keyboard='true'>Show Bank Account & Routing Number ?</a>
You can see the 2.0 docs here, on my website http://okonski.org/bootstrap-zindex/docs/javascript.html#modals
So here are the screenshots of alignment issues for forms inside a modal -
http://cl.ly/0h1H071J413S3F080k2O
http://cl.ly/3R2V0j0S0z3s2U1i313j
Hi - I was wondering if this is an issue or something that I am doing wrong?
Also I tried using the grid system for layout inside a modal and it does not work.
The screenshots look right to me and are as I'd expect things to appear. In what way are you using the grid classes for the modal? Do you have a jsfiddle or a demo somewhere?
The modal doesn't work for me either in an upgrade situation.
It looks like Bootstrap is using JQuery 1.7+ features, and my existing code is 1.6.x. I can't see anywhere obvious where the JQuery version is specified.
@tomfakes All our javascript requires the latest jQuery—that's on our Customize page now, and I just added it to the JS plugins page. If you have a separate problem with that, open another issue please.
No I meant - when i create a horizontal form inside a modal I see alignment issues - http://cl.ly/3R2V0j0S0z3s2U1i313j
You can see its right aligned, is that how the default behavior would be in 2.0? coz in 1.4 I did not see any alignment issue, it was center aligned.
If thats the default behavior how do we layout content in a modal, using the grid system? I tried but heres what I got -
Here's my modal body code (Slim/HAML) -
.modal-body
.row
.span4
.alert.alert-success.hide id='cc-form-alert'
= render 'cc_form'
hr
div Some Info
hr
.span3
h3 Some Content
.span3
h3 Some Other Content
And here's how the content is being laid out in the modal - http://cl.ly/1I03070P2R2L0d2R1K15
The form doesn't appear to be right aligned, but rather left aligned and the content just runs wide right. Inspect or view source and I think you'll find that negative space on the left is the fixed-width labels and the super wide input you have is pushing to the right too much.
For laying out content in the modal, you'll need to use a set of columns that matches the width of the modal. By default, our modals are not full width of the grid, so you need fewer columns. Also, if you want the form to be centered, just add margin: 0 auto; to them and you're set.
Forgot to close this out. If there is still a problem, open a new issue. Thanks!
Yea thats good, horizontal form inside a modal is center aligned now, dont know but its working without any change :)
Thanks for your all help, you guys are doing a phenomenal job with bootstrap.