I was working with one web application based on twitter boostrap. There was an issue with modal poup width. My solution fixed the problem:
Javascript code to show the modal:
$('# myModal ').modal({
show: true,
}).css({
width: '900px',
'margin-left': function () {
return -($(this).width() / 2);
}
});
HTML code part
- <-- Modal -->
- <div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h3 id="myModalLabel">Modal header</h3>
- </div>
- <div class="modal-body">
- <p>One fine body…</p>
- </div>
- <div class="modal-footer">
- <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
- <button class="btn btn-primary">Save changes</button>
- </div>
- </div>
I created a quick tutorial here covering the same topic, would you tell me what you think? :) twitter bootstrap modal width
ReplyDelete