htmlにcssでjustify-content="center"とするのに、左寄りになってしまいます。
どこがおかしいのでしょう。
justify-content="center"の代わりに、margin:auto;を入力すると中央寄りになります。
さっぱりわからず、悩んでいます。
お手数ですが、お助けいただけたら幸いです。
コード ```<!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <title>CSSレイアウト</title> <meta name="description" content="CSSレイアウトのページです"> <link rel="stylesheet" href="./style.css"> </head> <body> <main> <nav></nav> <article></article> <aside></aside> </main> </body> </html> ~以下にcss~ main{ display:flex; max-width:1080px; margin-top:100px; justify-content: center; height:200px; column-gap:20px; } nav{ width:calc(1040px / 3); background:#ffe966; } article{ width:calc(1040px / 3); background:#72e8a7; } aside{ width:calc(1040px / 3); background:#84ceef; }

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2023/01/07 09:18