I’m trying to align this logo in the center of the page, between the two sections of links in the header. I have the image in a separate div, and a unordered list on either side, with float left and float right. Not sure if the order or nesting is correct, still very new to CSS and HTML. For some reason, the logo is sitting way above the row of header links, and I want them to all be horizontally aligned, with the logo vertically aligned too.
I tried to use text-align: center on the div with logo which centers it on the page, but places it above the header and social links. I also tried placing it before, after, and in between the unordered lists in the header_main div, with no luck.
3
Answers
Because they are in two different dev, you need to move mainLogo dev between the uls. or make its position absolute.
I dont have the images, so I am just giving an abbreviation. From the question, I got to know that you want to center the logo in the navbar.
For this, you can use a CSS property called flexbox. Add thatproperty to the parent class like;
Use flexbox to center of the header.
Click here.