ここに例を書きます:https://jsfiddle.net/1631pndx/2/2つのdivを1行に整列させますが、同じ要素にはありませんか?
2つの要素は2つの異なるdivに属します。しかし、私はそれらを1つの行に表示したい。他の要素を変更しないでください。 JavaScriptなしで、CSS経由で、どうやってこれを行うのですか?
.container_1,
.container_2,
.container_3 {
min-width: 200px;
min-height: 200px;
border: solid 2px lightblue;
margin: 10px;
}
.container_2 {
border: solid 2px gray;
}
.container_3 {
border: solid 2px chocolate;
}
<div class="container_1">
<h3> 1st element </h3>
</div>
<div class="container_2">
<p> some other elements</p>
<div class="container_3">
<p> some other elements</p>
<h3>2nd element</h3>
<h4>[The 1st element should in here]</h4>
</div>
</div>
'container_1'は' [最初の要素はここにあるはずです ']と言いたいのですか? –