2013-07-25 3 views
0

자습서를 검색했지만 세 가지 병렬 div를 설정하는 방법 만 보여줍니다.CSS가있는 4 개의 병렬 DIV를 설정하는 방법은 무엇입니까?

이 코드를 변경하고 4 개의 병렬 div를 넣을 수 있습니까?

<div style="width:90%;border:1px solid #000;"> 
    <div style="float:left; width:33.3%; background:#aaa;">one</div> 
    <div style="float:left; width:33.3%; background:#bbb;">two</div> 
    <div style="float:left; width:33.4%; background:#ccc;">three</div> 
<div style="clear:both;"></div> 

답변

0

이게 당신이 찾고 있는게 있나요?

<div style="width:90%;border:1px solid #000;"> 
    <div style="float:left; width:25%; background:#aaa;">one</div> 
    <div style="float:left; width:25%; background:#bbb;">two</div> 
    <div style="float:left; width:25%; background:#ccc;">three</div> 
    <div style="float:left; width:25%; background:#ddd;">four</div> 
<div style="clear:both;"></div> 
+0

니스, 나는 대답과 함께 빠르다고 생각했다.;) –

+0

네, 정말 고마워요. – user2604411

+0

첫 번째'div'는 어디에서 끝나나요? – Abhitalks

0
<div style="float:left; width:25%; background:#aaa;">one</div> 
<div style="float:left; width:25%; background:#bbb;">two</div> 
<div style="float:left; width:25%; background:#ccc;">three</div> 
<div style="float:left; width:25%; background:#ddd;">four</div> 

그냥 한 번 더 div 태그를 추가하고 유 네 된 div를 얻을 것이다 똑같이 나누어!

관련 문제