
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2019 02:24 AM
Hello,
Any idea on how to center my modal pop up? When my browser is maximized the pop up is located at the right side
But when I minimize my browser to a certain width, it is completely fine and centered.
Kind Regards,
Raphael
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2019 10:58 PM
Hello,
I think I found the reason why the modal is appearing on the right side. I tried to uncheck the 'left:50%' in modal-dialog and i set the left to 0% and it is now appearing at the center

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2019 11:52 PM
The reason why I mentioned removing the boostrap.min.css is that your Service Portal already has a boostrap style sheet. sp-bootstrap.
bootstrap.min.css does not appear to be out of box. Keep it in there adds unnecessary bloat to your Service Portal. Please also keep in mind that the Service Portal was built on the bootstrap framework already.
Overriding the style would probably fix it, but it's a bandaid and not addressing the problem/fact that you have two bootstrap style sheets trying to do the same thing competing.
Best of luck.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 03:18 PM
My bad, I assumed even the out of the box CSS had the same definition for .modal-dialog class.
Kristoffer is right here, if there is additional bootstrap stylesheet, probably remove that. My solution is helpful in cases where you want to override the out of the box sp-bootstrap CSS which you can't remove.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2019 11:42 PM
You use wrong classes for modal template. You should use modal-header, modal-body and modal-footer classes instead of panel-heading, panel-body and panel-footer. The outer div with panel class should removed additionally. The outer divs (div.modal, div.modal-dialog and div.modal-content) will be created by $uibModal. So the template should consist from only the inner of modal-content. See here, for example, for more details.
By the way, modal-dialog class uses CSS rule margin: 30px auto; with margin-left and margin-right set to "auto". It centers the dialog horizontally.
Alternatively I'd recommend you to consider to use spModal, which uses $uibModal internally. It will simplify your code.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2019 10:13 PM
Hi
Can you try going through this bootstrap modal?
https://www.w3schools.com/bootstrap/bootstrap_modal.asp
Regards,
Omkar.