I have the following HTML for the modal. When the seach-result-view is dynamically populated with content from the database(using ajax) it goes off page. I.e the content in seach-result-view goes off page and becomes un scrollable. I was expecting the Search-Result_div to be scrollable as it is inside another div (#Search_result).
<div id="search_result" class="modal hide fade" 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">Search results</h3>
</div>
<div id="seach-result-view" class="modal-body">
</div>
Css is below.
.modal {
position: fixed;
top: 10%;
left: 40%;
width:780px;
z-index: 1050;
margin-left: -280px;
background-color: #ffffff;
border: 1px solid #999;
border: 1px solid rgba(0, 0, 0, 0.3);
*border: 1px solid #999;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
outline: none;
-webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
-webkit-background-clip: padding-box;
-moz-background-clip: padding-box;
background-clip: padding-box;
}
.modal-body {
position: relative;
max-height: 80%;
padding: 15px;
overflow-y: auto;
}
What can i be doing wrong here? appreciate any help :)