troubleshooting Question

Aligning a bootstrap modal to the side of the page

Avatar of Peter Nordberg
Peter NordbergFlag for Sweden asked on
CSSBootstrap
2 Comments1 Solution109 ViewsLast Modified:
Hi,

I have a regular css bootstrap Modal looking like this:

 <!-- modal default -->
                <div id="myModal2" aria-hidden="true" aria-labelledby="myModalLabel" class="modal fade" role="dialog" tabindex="-1">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span></button>
                                <h4 id="myModalLabel" class="modal-title">Modal title</h4>
                            </div>
                            <div class="modal-body">
                                <p>Aliquam erat volutpat. Proin lacus erat, aliquam id efficitur sit amet, mattis vel urna. Pellentesque malesuada turpis vitae vestibulum facilisis. Aliquam vehicula felis vel justo consectetur, quis volutpat tellus consequat. Aliquam tellus lacus, eleifend at leo vitae, imperdiet cursus ex. Sed sodales augue euismod felis auctor auctor. Suspendisse sodales fermentum dolor sed mattis. Ut ipsum nunc, volutpat non velit a, tristique tempor mauris. Duis ac finibus lectus. Cras blandit eros ac diam luctus mattis. Nam dignissim mattis blandit. Nulla facilisi. Nullam non massa ac mauris efficitur congue aliquet ut orci.</p>
                                <p>Maecenas volutpat, massa rhoncus eleifend sagittis, sem nulla mollis ante, non porta dolor quam ullamcorper elit. Mauris accumsan nulla non risus accumsan auctor. Praesent luctus, mi id aliquet molestie, ex sem aliquet lorem, ut tempor ex urna ut orci. Aenean eget mi magna. Vestibulum quis congue nunc. Nulla faucibus felis eros, ut ultricies sapien mattis at. Aenean facilisis gravida quam vitae dignissim. Quisque ac orci vel tellus eleifend faucibus.</p>
                                <p>Suspendisse vitae tincidunt leo, eu tempus sem. Donec congue, lacus id mattis convallis, ex lectus molestie tortor, at porttitor ipsum quam sit amet tellus. Nulla facilisi. Ut ut risus mi. Donec nec sollicitudin lacus. Praesent at lorem mauris. Curabitur pulvinar nunc non auctor elementum.</p>
                            </div>
                            <div class="modal-footer">
                                <button class="btn btn-default" data-dismiss="modal" type="button">Close</button>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.modal default -->

Now I want to just align it to the right of the page and to the full with of the div holding it. How can I do it?

Thanks!

Peter
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros