I am using Bootstrap to make a frontpage with a div that is centered horizontally and vertically within the page. However, I am facing some styling issues. The margin-left does not seem to apply when using a class.
Here's the HTML5 markup:
<div class="container">
<div class="btn-group">
<button type="button" class="btn btn-primary btn-lg pad-left">Login</button>
<button type="button" class="btn btn-primary btn-lg pad-left">Register</button>
</div>
</div>
Here's the CSS markup:
body{
background-image: url('http://images.alphacoders.com/234/234641.jpg');
background-size: cover;
background-repeat: no-repeat;
}
div.btn-group{
outline: 1px solid red;
width: 20%;
}
.pad-left{
margin-left: 10px;
}
Also, what are the best practices to center a div horizontally and vertically?