Avatar of Peter Nordberg
Peter Nordberg
Flag for Sweden asked on

Aligning a bootstrap modal to the side of the page

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 -->

Open in new window


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
CSSBootstrap

Avatar of undefined
Last Comment
Peter Nordberg

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Scott Fell

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Peter Nordberg

ASKER
Thanks!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck