2014-02-16 4 views
0

내가 수평으로 할, 3 열로 수직 레이아웃을 만들려고하는 것은 어려운 일이 아니다 :3 열 세로 레이아웃 만들기?

라이브 수평 예 : http://jsfiddle.net/NQU9u/

그러나 수직으로, 나는 그 코드의 반대를 시도 :

<div style="width:100%; height :100%; background-color:Lime;"> 
    <div style="width:33%; height:100%; background-color:Blue;"> 
    a 
    </div> 
    <div style="width:34%; height:100%; background-color:Gray;"> 
    b 
    </div> 
    <div style="width:33%; height:100%; background-color:Aqua;"> 
    c 
    </div>   
</div> 

슬프게도 이것은 작동하지 않습니다.

도움이나 제안이 있으십니까?

+1

'float : left;'를 열에 추가 하시겠습니까? –

답변

1
<div style="width:100%; height :100%; background-color:Lime;"> 
    <div style="width:34%; height:100%; background-color:Blue; float:left;"> 
     a 
    </div> 
    <div style="width:33%; height:100%; background-color:Gray; float:left;"> 
     b 
    </div> 
    <div style="width:33%; height:100%; background-color:Aqua; float:left;"> 
     c 
    </div>   
</div> 
+0

고마워요, 이것이 해결책이었습니다! – user3125757