ホーム › 会員専用コンテンツ › HTML・CSS › iPhoneだけコンテンツが崩れてしまいます。 › 返信先: iPhoneだけコンテンツが崩れてしまいます。
2023/10/24 16:55
#575
![Galileo&Venus](https://davinci-salon.com/wp-content/uploads/ultimatemember/1/profile_photo-80x80.jpg?1722070151)
キーマスター
WindowsPCで各ブラウザで確認したとことですが、Safariでの確認は行なっていますか?
cssでflexを使う場合、flexコンテナ(今回でいうdiv)にwidthを指定してあげないと、Safariでレイアウトが崩れることがあります。
以下のように、flexコンテナにwidthの指定をしてみてください。
/*CSS*/
div{
/*=任意の値=*/
width: 500px;
/*======*/
display: flex;
justify-content: center;
align-item: center;
}
div p{
width: 100px;
}