I am currently utilizing Bootstrap 3 to design my website, where I have set up divs for each section to occupy 100% of the space regardless of browser manipulation. My goal is to keep my content centered within these sections at all times.
Struggling with achieving this objective.
Shown below is the code snippet:
<div id='imgDiv'>
<div class="container" style="padding-top: 300px;">
<a href="#imgDiv3">Smoothscroll</a>
<center>
<h1 style="font-size: 32px; font-weight: 300;">Header</h1></center>
<center>
<h2 style="font-size: 20px;font-weight: 300; padding-top: 30px;">My name</h2>
</center>
</div>
</div>
html, body {
height:100%;
width:100%;
margin:0;
padding:0;
position:relative;
font-family: 'Ubuntu', sans-serif;
}
#imgDiv {
position:relative;
height:100%;
background-color: #1ABC9C;
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
color: #FFF;
}