2011-03-28 7 views
2

나는 내가 원하는 것을 이루기 위해 여백과 패딩을 사용할 수 있다는 것을 알고있다. 그러나, 그것은 조금 보인다. 나는 이상하게 여긴다. 나는 단지 구조가 있다고 느끼는 것 뿐인가? 이 일을하는 방법? Headings and lists inside a black DIV.이 레이아웃 유형에 가장 적합한 방법은 무엇입니까?

어떻게 당신은 내가이 일에 대해 가지 제안 : 여기

는 내가하고 싶은거야? 모든 조언을 부탁드립니다.

감사합니다.

답변

1

오, 내가 사랑에 빠진 CSS 그리드 시스템이 있습니다. 구현하기 쉽고 이해하기 쉽습니다. 그것을 확인하십시오, 그것의 전화 번호는 960 Grid System입니다. 960px 용으로 만들어졌지만 변경하기가 쉽습니다.

<div class='container_4'><!-- this will be a container that takes up four grid spots--> 
    <div class='grid_1 alpha'><!-- this will start from the first column in the container and will take one spot--> 
     <h2>Heading</h2> 
     <li>List Item</li><!-- et cetera --> 
    </div> 
    <div class='grid_1'><!-- this takes up next spot and extends one col --> 
     <h2>Heading</h2> 
     <li>List Item</li><!-- et cetera --> 
    </div> 
    <div class='grid_1'><!-- this takes up next spot and extends one col --> 
     <h2>Heading</h2> 
     <li>List Item</li><!-- et cetera --> 
     <h2>Heading</h2> 
     <li>List Item</li><!-- et cetera --> 
    </div> 
    <div class='grid_1 omega'><!-- this takes up last spot and extends one col --> 
     <h2>Heading</h2> 
     <li>List Item</li><!-- et cetera --> 
    </div> 
</div> <!-- end the container --> 

알파 및 오메가 클래스는 행의 첫 번째 및 마지막 모눈 항목으로 이동합니다.

+0

나는 항상 960px를 사용합니다. 귀하의 답변을 주셔서 감사합니다. 그러나 저는 항상 그리드 시스템을 이해하려고 애를 썼습니다. 그것에 대해 뭔가 .. 단지 침몰하지 않습니다. –

+1

예제 코드 다음에 예제 코드를 추가하겠습니다. –

+0

감사합니다. Sydenam, 죄송합니다. –

관련 문제