Saturday 15 January 2011

asp.net mvc - MVC 5 / Bootstrap App - Modal Dialog Auto expand? -



asp.net mvc - MVC 5 / Bootstrap App - Modal Dialog Auto expand? -

i've got next html in mvc 5 / bootstrap app. can see, attempting display photo in modal dialog. works fine. but, if photo wider dialog, extends beyond bounds of dialog. there way can have dialog expand, point, display scroll bars, based on size of contents (image)?

<div class="modal fade" id="viewphotodialog" tabindex="-1"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4>ask experts</h4> </div> <div class="modal-body"> <img src="@url.action("getphoto", new { asktheexpertid = @model.asktheexpertid })" alt="" title=""/> </div> <div class="modal-footer"> <button class="btn btn-primary" data-dismiss="modal">close</button> </div> </div> </div> </div>

you can add together .img-responsive class img (gives max-width:100% , auto height). modal width, there 2 alternative classes modal-lg , modal-sm can add together @ .modal-dialog http://getbootstrap.com/javascript/#modals

asp.net-mvc twitter-bootstrap

No comments:

Post a Comment