dont seem to be able to do this, i have a div 200px x 200px and a h2 tag that i want to position at the bottom of the box dead center, ive tried vertical align center on this but that doesnt seem to solve the problem? I have also tried adding position relative to the box then absolute position to the h2 but im sure theres a better approach?
<div class="box">
<h2>My title</h2>
</div>
.box{
width: 200px;
height: 200px;
background: #dedede;
}
h2{
text-align: center;
vertical-align: bottom;
}
there gives more than one solution.
First: Update your CSS to: