How to align logo in middle of the header.

Engaged ,
Jun 03, 2019 Jun 03, 2019

Copy link to clipboard

Copied

Hi,

I want to align the logo to the middle of the header horizontally and vertically.

Q1.

Why doesn't the flexbox work?

.logo {

          display: flex;

          justify-content: center;

          align-items: center;

}

Q2.

How do I do?

Link

Hosuns Portfolio 3

Hosun Kang

Q_Dw_18_alignment.png

Tittle was edited by Moderator

Views

253

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jun 03, 2019 Jun 03, 2019

Instead of applying the styling to the .logo

.logo {

          display: flex;

          justify-content: center;

          align-items: center;

}

apply it to the box containing the logo:

box1 {

display: flex;

justify-content: center;

align-items: center;

}

Likes

Translate

Translate
LEGEND ,
Jun 03, 2019 Jun 03, 2019

Copy link to clipboard

Copied

LATEST

Instead of applying the styling to the .logo

.logo {

          display: flex;

          justify-content: center;

          align-items: center;

}

apply it to the box containing the logo:

box1 {

display: flex;

justify-content: center;

align-items: center;

}

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines