• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 HTML/CSS 게시판 에 대해서

에 대해서

2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 글쓴이
  • #79615

    윤준호
    참가자
    html
        <div class="product-container">
          <div>
            <h4>Fast Shipping</h4>
            <p>jack</p>
          </div>
          <div>
            <h4>crycrycry</h4>
            <p>jack</p>
          </div>        
          <div>
            <h4>kssssr</h4>
            <p>jack</p>
          </div>        
          <div>
            <h4>go home now</h4>
            <p>jack</p>
          </div>
          <div style="float: none; clear: both;"></div>
          
        </div>
    
    css
    
    .product-container{
        max-width: 1000px;
        margin: auto;
        margin-top: 50px;
        margin-bottom: 50px;
        width: 100%;
        background-color :aquamarine
    }
    .product-container div{  
        float : left;
        width : 25%;         
        text-align: center;
    }
    
    product-container div밖에 <div style="clear : both">를 썼을때는 배경이 안 나타나는데
    <div style="float: none; clear: both;"></div> 를 안쪽에 쓰니 배경이 나타나더라구요.
    여기서 <div style="float: none; clear: both;"></div>의 원리가 뭔가요?
    그냥 잘 모르겠으면 일단 외우는데 나을까요?
    #79638

    codingapple
    키 마스터
    원래 float쓴거 바로 밑에 clear속성 넣은 박스 배치해야 다음박스가 제자리를 찾습니다
2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠