同じクラスで3つのdivの内側のボタンをインライン化することはできません は、私は3つのように同じクラスを持つdiv要素を持っている
の問題は、内部要素divはインラインで注文されておらず、理由はわかりません。ここに私のCSSです:少しの助けをいただければ幸いです :
@import "https://fonts.googleapis.com/css?family=Lato";
* {
margin: 0;
padding: 0
}
main {
font-family: Lato, sans-serif;
background: #729fcf;
padding: 20px;
display: flex;
justify-content: center;
}
.item {
background: #f0ebff;
width: 300px;
height: 350px;
margin: 20px;
text-align: center;
padding: 20px;
box-sizing: border-box; float: left;
}
.item img {
width: 100px;
display: inline;
}
.item h3 {
text-transform: uppercase;
margin: 15px 0;
}
.item p {
margin: 35px 0;
font-size: 12px;
}
.item button {
background: 0;
padding: 10px;
border: 3px solid #6076cc;
border-radius: 10px;
font-size: 12px;
margin-top: 35px;
}
[1]: https://i.stack.imgur.com/2QxOA.jpg
かいつまんで、予想される出力は、次の絵です。
すべての3つのdivに同じサイズの画像を入れて – Nivedita