.ParentDiv { height: 100%; width: 100%; display: table; } .ChildDiv{ display: table-cell; vertical-align: middle; text-align: center; }
Align div vertical center - the old way
How to keep a fixed 100% height sidebar while page scroll
.sidebar {
position: fixed;
width: 200px;
height: 100%;
background: #000;
}
.content {
margin-left: 200px;
height: 500px;
width: auto;
position: relative;
background: #f00;
overflow: auto;
z-index: 1;
}
.info {
width: 1440px;
height: 300px;
position: relative;
background: #f55;
}
http://jsfiddle.net/djwave28/JZ52u/
position: fixed;
width: 200px;
height: 100%;
background: #000;
}
.content {
margin-left: 200px;
height: 500px;
width: auto;
position: relative;
background: #f00;
overflow: auto;
z-index: 1;
}
.info {
width: 1440px;
height: 300px;
position: relative;
background: #f55;
}
http://jsfiddle.net/djwave28/JZ52u/
Bootstrap modal popup automatically timeout close
bootstrap modal popup automatically timeout close
<script>
$(document).ready(function () {
$('.face').click(function () {
$('#myModal').modal('show', function () {
clearTimeout(myModalTimeout);
});
myModalTimeout = setTimeout(function () {
$('#myModal').modal('hide');
}, 1000);
});
});
</script>
<script>
$(document).ready(function () {
$('.face').click(function () {
$('#myModal').modal('show', function () {
clearTimeout(myModalTimeout);
});
myModalTimeout = setTimeout(function () {
$('#myModal').modal('hide');
}, 1000);
});
});
</script>
Subscribe to:
Posts (Atom)