2017-02-01 9 views
0

2枚のカードで1列に2列のグリッドがあります。私はまた、カードがお互いに触れていないように余白が欲しいですが、w3-marginを私のカードに追加すると、それらは異なる行に折り返されます。欄に余白があるカード

列の整合性に影響を与えずに、カードの周囲に余白を付けるにはどうすればよいですか?ありがとう。

フィドル(それが働いて見てw3-marginのインスタンスを削除):https://jsfiddle.net/n2fole00/7o6bnosu/

<div class="w3-row-padding"> 

    <div class="w3-col s6 m6 l6 w3-card-2 w3-yellow w3-margin"> 
    <p>Cards should be on the same row with some space between them.</p> 
    </div> 

    <div class="w3-col s6 m6 l6 w3-card-2 w3-green w3-margin"> 
    <p>Cards should be on the same row with some space between them.</p> 
    </div> 

</div> 

答えて

0

私はそれを考え出しました。私はちょうど1つの部門であまりにも多くをやろうとしていた。誰かが興味があれば、私の解決策はここにあります。

<div class="w3-col m6"> 
    <div class="w3-card-2 w3-margin w3-light-grey w3-center" style=""> 
    ...content... 
    </div> 
</div> 
関連する問題