Rama Priya Rama Priya - 1 year ago 171
CSS Question

In a bootstrap responsive page how to center a div

position a div at centre of a responsive page

I need to create a responsive page using bootstrap by position a div at the centre of a page as like in the below mentioned layout.

Answer Source

Check this out-

@import url('http://getbootstrap.com/dist/css/bootstrap.css');
 html, body, .container-table {
    height: 100%;
.container-table {
    display: table;
.vertical-center-row {
    display: table-cell;
    vertical-align: middle;
<script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.1.0/bootstrap.min.js"></script>

<div class="container container-table">
    <div class="row vertical-center-row">
        <div class="text-center col-md-4 col-md-offset-4" style="background:red">TEXT</div>

It's a simple example of a horizontally and vertically div centered in all screen sizes.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download