Skip to content

Instantly share code, notes, and snippets.

@isu3ru
Created January 13, 2015 03:25
Show Gist options
  • Save isu3ru/e3b719fa6a45ae060a50 to your computer and use it in GitHub Desktop.
Save isu3ru/e3b719fa6a45ae060a50 to your computer and use it in GitHub Desktop.
Bootstrap Modal Window
<style>
body {
background: white;
font-size: 13px;
overflow: hidden;
}
#notifcation_overlay {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 4001;
background: rgba(0,0,0,0.8);
}
.notification {
width: 500px;
min-height: 200px;
position: absolute;
top: 100px;
left: 30%;
background: #FFF;
z-index: 4052;
box-shadow: 0px 0px 5px #666;
border: 1px solid #666;
}
.notification_header {
padding: 5px 10px;
background: black;
color: white;
}
.notification_header h4 {
font-size: 1.2em;
}
.notification_body {
padding: 10px;
}
.notification_footer {
background: #AAA;
padding: 5px;
border-top: 1px solid #999;
}
</style>
<div class="notification_overlay"></div>
<div class="notification">
<div class="notification_header">
<h4>Nam tincidunt erat nec sed.</h4>
</div>
<div class="notification_body">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque a neque facilisis, lacinia tellus vitae, lacinia massa? Fusce sit amet orci erat. Aliquam sodales pellentesque sodales. Cras egestas odio sed felis imperdiet, sed pulvinar nisi condimentum. Integer et sodales magna! Mauris eu nunc sit amet tellus scelerisque sagittis sit amet ornare tellus. Pellentesque feugiat enim quis eros vulputate, sit amet dignissim nibh pulvinar? Aenean iaculis molestie leo, eget sagittis lorem laoreet mollis! Proin ex augue, posuere eget orci non, gravida maximus erat. Donec tempus erat sit amet massa luctus, ut faucibus nibh feugiat. Cras in erat sed augue tincidunt mattis at sit amet felis.
</p>
</div>
<div class="notification_footer">
<button class="btn btn-small btn-primary closebutton">Close</button>
</div>
</div>
@isu3ru
Copy link
Author

isu3ru commented Jan 13, 2015

Use this code to create a modal dialog with bootstrap.
I have created this code using bootstrap 2.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment