Why is my #menu
<a>
element moving to a different location every time I add my #menubarheader
<h1>
? Despite my knowledge of html and css, I can't seem to find a solution to this issue. Here's my code, any help would be appreciated.
HTML :
<div id="right">
<div id="menubar">
<h1 id="menubarheader">Latest News</h1>
<a href="#menu" id="button">≡</a>
</div>
</div>
CSS :
#menubar {
width: 100%;
background-color: maroon;
height: 80px;
line-height: 80px;
}
#button {
color: black;
font-size: 4em;
text-decoration: none;
font-weight: lighter;
padding: 0px;
vertical-align: middle;
float: left;
}
#menubarheader {
text-align: center;
color: white;
vertical-align: middle;
font-weight: lighter;
font-size: 32px;
}
I'm considering if the line height might be causing the issue, but I need it for vertical alignment. I'm creating an Android app with PhoneGap, so any assistance would be highly appreciated. Thank you in advance!