My HTML header currently has a simple title bar with a back href. However, the headline <h1>
is positioned UNDER the href, which is not what I want. I am looking to create a centered title bar with a headline and a button that are aligned at the same height.
html,
body {
height: 100%;
margin: 0;
background-color: #EEEEEE;
font-family: 'RobotoDraft', 'sans-serif';
}
header {
background: #FFFFFF;
height: 60px;
width: 100%;
box-shadow: 0px 2px 1px #888888;
margin: 0;
padding: 0;
overflow: hidden;
}
h1 {
color: black;
text-align: center;
padding: 15px 0;
margin: 0;
font-size: 30px;
}
<header>
<a href="#">Back</a>
<h1>Photo Framed</h1>
</header>
Any suggestions on how I can achieve this?
This is the current appearance:
As a newcomer to HTML and CSS, I'm unsure how to prevent the title from being pushed down by the back href. In the future, I plan to replace the href with an image while maintaining the same alignment. Both the title and the image should have a padding of 15px and be at the same height.