I am a little confused about how to position text in a div
. I want the text to be in the centre of the div
height-wise, so I've tried changing the top padding
and margin
and also the position but nothing is working. This usually worked for me before so I don't know why it is not working now.
Here is the code I have
<div class="foot">
<div class="menu">English</div>
<div class="menu">Maths</div>
<div class="menu">Science</div>
<div class="menu">SAM</div>
<div class="menu">German</div>
</div>
and the CSS
.menu {
width: 200px;
display: inline;
padding: 5px 7% 0% 7%;
font-size: 20px;
position: relative;
}
.foot {
width: 100%;
height: 40px;
position: fixed;
bottom: 0px;
background-color: #54a992;
border-top: solid black 1px;
text-align: center;
opacity: 100%;
z-index: 2;
left: 0px;
}