Link to home
Get AccessLog in
Avatar of Peter Nordberg
Peter NordbergFlag 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
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This content is only available to members.
To access this content, you must be a member of Experts Exchange.
Get Access
Avatar of Peter Nordberg

ASKER

Thanks!