wrapper2のdivの中でdiv要素を横並びで2列表示にしたいです。
wrapper2は画面の一番下までいっぱいになるように広げたいので
position: fixed;を指定しました。
pinkとredの要素を2列横並びにしたいのですが、
pinkは正常に表示され、redが表示されません
何が悪いのでしょうか。。
HTML
1<main> 2 <div class="wrapper2"> 3 <div class="wrapper2-container container-left"> 4 5 </div> 6 7 <div class="content2-container container-right"> 8 9 </div> 10 </div> 11</main>
CSS
1.wrapper2 { 2 width: 100%; 3 height: 100%; 4 margin: 0; 5 padding: 0; 6 position: fixed; 7 display: flex; 8 background-color: #91cd79; 9} 10 11.wrapper2-container { 12 width: 50%; 13} 14 15.container-left { 16 float: left; 17 background-color: pink; 18} 19 20.container-right { 21 float: left; 22 background-color:red; 23}
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/11/02 07:19
2020/11/02 10:15