Here is the HTML code:
<div id="homepage_boxes_holder">
<div class="homepage_boxes">
<h3 class="box_heading">Test</h3>
</div>
<div class="homepage_boxes">
<h3 class="box_heading">Test</h3>
</div>
<div class="homepage_boxes">
<h3 class="box_heading">Test</h3>
</div>
</div>
Here is the CSS:
.homepage_boxes{
width: 300px;
height: 200px;
float: left;
margin-top: 100px;
margin-right: 80px;
margin-left: 150px;
line-height: 10;
}
.box_heading{
text-align:center;
font-family: BebasNeue;
font-size: 30px;
padding: 0;
margin: 0;
border: 1px solid black;
}
For some reason, the h3 is occupying a huge amount of space in the div (it looks as though the padding is huge to me but that can't be since I have set it to 0). I have put a border on the .box_heading
for demonstrative purposes. Image is here:
Link to image: https://i.stack.imgur.com/65R0s.jpg
-The blue is the div border, and the black is the H3 border.
EDIT: If possible, I would also like the heading to be centred on the div, rather than pushing outside the boundaries.