2016-12-02 1 views
3

これらの2つのオーバーフローを防ぐにはどうすればよいですか?私はここからどこに行くのかわからないので、ほとんどすべてを試しました。 divには緑色とオレンジ色が付いています。 enter image description heredivがオーバーフローしないようにする

enter image description here

#stemplingerclass { 
 
    clear: both; 
 
    max-width: 100%; 
 

 
} 
 

 
#datoid 
 
{ 
 

 
    clear: both; 
 
    max-width: 100%; 
 
}
<div class="col-sm-10"> 
 
    <div class="col-md-3 col-sm-3 col-xs-10 text-center" style="background-color: green;" > 
 
     <div id="datoid"> 
 

 

 
     </div> 
 
     </div> 
 

 
     <div class="col-md-7 col-sm-7 col-xs-10" style="background-color: orange;"> 
 
     <div id="stemplingerclass"> 
 

 
     </div> 
 
     </div> 
 
    </div>

+0

あなたは 'overflow-y:hidden;'を試しましたか? とあなたのコードスニペットdoesentが動作します... – weinde

+1

あなたのコードをフィドルで更新してください。 –

+0

overflow-y:hidden;カレンダー部分をスクロール可能にするだけの "同じ"結果を与えます。 –

答えて

1

ただ、コンテナにdisplay: flex;を追加これら2つの部門の 子供が伸びないようにしたい場合は、align-items: flex-start;もあなたに入れてください。

0

#greenpart{ 
 
    display: inline-block; 
 
width:49%; 
 
    overflow: scroll; 
 
    } 
 

 
    #orangepart{ 
 
     display: inline-block; 
 

 
width:49%; 
 
    overflow: scroll; 
 

 
    }
<div id="greenpart" class="col-md-3 col-sm-3 col-xs-10 text-center" style="background-color: green;" > 
 
      <div id="datoid"> 
 

 
    test1 
 
      </div> 
 
      </div> 
 

 
      <div id="orangepart"class="col-md-7 col-sm-7 col-xs-10" style="background-color: orange;"> 
 
      <div id="stemplingerclass"> 
 
    test2 
 
      </div> 
 
      </div>

+0

うまくいかなかった、2列をお互いに表示しました。 –

0

             
  
#datoid { 
 
    width: 50%; 
 
    height: 100px; 
 
    float: left; 
 
    background-color: inherit; 
 
    overflow: scroll; 
 
} 
 

 
#stemplingerclass { 
 
    width: 50%; 
 
    height: 100px; 
 
    float: right; 
 
    background-color: inherit; 
 
    overflow: scroll; 
 
}
<div class="col-sm-10"> 
 
     <div class="col-md-3 col-sm-3 col-xs-10 text-center" style="background-color: green;" > 
 
      <div id="datoid"> 
 

 

 
      </div> 
 
      </div> 
 

 
      <div class="col-md-7 col-sm-7 col-xs-10" style="background-color: orange;"> 
 
      <div id="stemplingerclass"> 
 

 
      </div> 
 
      </div> 
 
     </div>
関連する問題