前提
レスポンシブ対応をしています。
①中間サイズ時、記事の文字が切れてしまいます。
②携帯サイズ時、タイトルが1行にならない。
③携帯サイズ時、文字、記事、ボタンが真ん中にならない。
お分かりの方おられましたら、
ご教示ください。
実現したいこと
上記を解決したい。
発生している問題・エラーメッセージ
<h2>Feature</h2> <div class="about wrapper"> <article><h3>What is “Coding Basics”?</h3> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea. commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu. </p> <a class="button" href="#">Read More</a> </article> <aside> <img src="images/sample@2x.png" alt="パソコンを見る女性"> </aside>
該当のソースコード
/* about
---------------------*/
.about {
display: flex;
text-align: center;
justify-content: space-around;
margin-bottom: 50px;
このコードをクリップボードにコピー
}
/*記事部分 */
article {
width: 45%;
order: 2;
}
/*小さな画像 */
aside {
width: 480px;
height: 329px;
margin-right: 10px;
order: 1;
}
h3 {
font-size: 32px;
}
article p {
font-size: 16px;
letter-spacing: 0px;
text-align: left;
letter-spacing: 0px;
line-height: 24px;
margin-bottom: 40px;
width: 394px;
height: 161px;
}
/* モバイル版
-------------------*/
@media (max-width:600px) {
.about {
flex-direction: column;
}
.article,
.aside {
width: 100%;
}
h3 {
font-size: 2rem;
flex-wrap: nowrap;
}
.article {
text-align: center;
}
試したこと
cssグリッドでgrid-template-colums: 1fr 1fr;
を試しましたがうまくいきません。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2022/09/18 12:41