Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to align logo in middle of the header.

Enthusiast ,
Jun 03, 2019 Jun 03, 2019

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

589
Translate
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;

}

Translate
LEGEND ,
Jun 03, 2019 Jun 03, 2019
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;

}

Translate
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