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

Why isn't my image centring?

Explorer ,
Mar 13, 2020 Mar 13, 2020

Copy link to clipboard

Copied

Before i adjusted the width of the image, it was centered, however it was also the full width of the page, which stretched the image. After the i adjust the width, it sits to the left of the page and i don't know why? Can someone help me to center it please?HTMLHTMLCSSCSSwhat it looks like in a browserwhat it looks like in a browser

Views

485

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 , Mar 13, 2020 Mar 13, 2020

add - align-items: center; to your '.centered-content' css selector. That is what you need if you set the flex-direction to column and you wont need to add the 'text-align: center'

 

 

Votes

Translate

Translate
LEGEND ,
Mar 13, 2020 Mar 13, 2020

Copy link to clipboard

Copied

add - align-items: center; to your '.centered-content' css selector. That is what you need if you set the flex-direction to column and you wont need to add the 'text-align: center'

 

 

Votes

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
Explorer ,
Mar 13, 2020 Mar 13, 2020

Copy link to clipboard

Copied

LATEST

AHHHHHHH THANK YOU SO MUCH!!!!!!!

Votes

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