텍스트를 2 열로 나누려고합니다. 문제는 첫 번째 클래스의 div div 콘텐츠가 너무 많아서 div가 주 div 아래에 놓이게된다는 것입니다.CSS로 2 열로 텍스트 분할
HTML
<div class="a textbox">
This is a main div
</div>
<div class="b textbox"> <!-- the problem is when this text became too much, the second class b div is pushed under the main one-->
This is a side bar div
</div>
<div class="b textbox">
This is another sidebar div
CSS
.a{float:left; width:70%; margin:10px;}
.b{float:left; color:blue; width:20%; margin:10px}
.textbox{text-align:justify;padding:10px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box; background: rgba(113,113,113,0.5);
-webkit-border-radius: 10px;-moz-border-radius: 10px;border-radius: 10px;}
내 바이올린 :
http://fiddle.jshell.net/hbqs6/1/
예상 결과 :
주요 사업부 측 div1
주요 사업부 측 div1
주요 사업부 측 DIV2
주요 사업부 측 DIV2 방법 float: left
작품이다
그래, 그 divs 항상 그렇게. 부끄러운 줄 알아라. –
샌드 박스에 연결하는 것이 좋습니다. 여기에 코드를 게시하십시오. – RandomSeed