bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Remove bottom form margin when inside a modal

Open pamelafox opened this issue 15 years ago • 7 comments

I think a common use of modals will involve a form inside the modal, and buttons for the form in the footer. With the default CSS, the form will have a margin-bottom, and that doesn't look great in the modal.

I made this change: .modal form { margin-bottom: 0px; }

Example HTML where I use this:

It's a small thing so perhaps not worth adding global change. Your call.

pamelafox avatar Sep 28 '11 21:09 pamelafox

Yeah, it's an interesting challenge because the form might not be the last thing in the modal and you would need that extra space. Going to file this as a bug though anyway and see if we can make it happen.

mdo avatar Sep 29 '11 01:09 mdo

Fixed in dev branch for now by undoing bottom margin for forms in modals. Will revisit in 2.0.

mdo avatar Oct 10 '11 03:10 mdo

When will version 2.0 launch?

effectjam avatar Dec 18 '11 04:12 effectjam

There is an additional complication when using with (at least) form-stacked, which adds a left-padding as well.

idbentley avatar Dec 18 '11 22:12 idbentley

@effectjam it has no date set, so far.

pokonski avatar Dec 18 '11 22:12 pokonski

I'm trying to put a form in a modal, but it's still with a bottom margin. I saw there is a class called modal-form, which resets margin-bottom to 0. Where should I apply this class?

tuler avatar Apr 12 '12 04:04 tuler

@tuler It should be applied as the class of the form you are using inside the modal.

candreoliveira avatar Oct 06 '13 22:10 candreoliveira