I am trying to write my own CSS that emulates the design of this website. Currently I have my screen divided into four sections using this code:
HTML:
<body>
<div class="topnav">
Welcome to TBD
</div>
<a href="URL">
<div class="part1"></div>
</a>
<div class="part2"></div>
<div class="part3"></div>
<a href="URL">
<div class="part4"></div>
</a>
</body>
CSS:
html,body
{
padding:0;
margin:0;
height:100%;
min-height:100%;
}
.part1 {background-color:#722F37; width:50%; height:50%; float:left}
.part2 {background-color:#FFC987; width:50%; height:50%; float:left}
.part3 {background-color:#f4a460; width:50%; height:50%; float:left}
.part4 {background-color:#7F171F; width:50%; height:50%; float:left}
I want to place an some text and an image below that text directly in the center of each div I have created. I attempted this, but could only get the text to display at the top of each div, not dead center. How could I do this?
Here is a fiddle of my current layout.