I'm currently working on a website and I am trying to figure out how to position the title and logo in the header. Ideally, I want the title to be centered and the logo to be on the left.
However, I've encountered an issue where the title is causing the logo to move down.
So far, I have attempted the following solutions:
- Adjusting the margins
- Changing the padding
- Rearranging the code
- Modifying the "Display" property
What other approaches could I take?
.header {
position: fixed;
height: 100px;
width: 100%;
left: 0;
top: 0;
background-color: rgb(204, 31, 0);
}
.titlemain {
font-size: 4vw;
text-align: center;
padding-top: 1.5%;
margin-block-start: 0;
margin-block-end: 0;
margin-inline-start: 0;
margin-inline-end: 0;
}
https://pastebin.com/Vvw7LtQE - CSS
<div class="header">
<h1 class="titlemain">The Little Beauty Studio</h1>
<img class="logomain" src="img/lblogo.png" alt="The PHP logo">
</div>
https://pastebin.com/0BKmtkZ8 - HTML
Any assistance would be greatly appreciated. Thank you.