html
  • css
  • clear
  • 2012-09-19 2 views -1 likes 
    -1

    가능한 중복 :
    Why is this clear:both acting globally?CSS 세 열 레이아웃 - 청산 플로트

    나는 alistapart에 예를 들어 세 개의 열 레이아웃이 있습니다 http://www.alistapart.com/d/negativemargins/ex5.htm를,하지만 난려고 할 때 "clear : left"스타일로 상자를 만드십시오. <p style='clear:left;'>Lorem ... arcu.</p> 왼쪽 상자 아래의 내용물이 점프합니다. 화면 : bug demonstration (크롬, 파이어 폭스, ...).

    문제를 해결하는 가장 좋은 방법은 무엇입니까?

    <h1>content</h1> 
           <p style="float:left;">sdfsf</p> 
    <p style="clear:left">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus varius eleifend tellus. Suspendisse potenti. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nulla facilisi. Sed wisi lectus, placerat nec, mollis quis, posuere eget, arcu.</p> 
    
    +0

    이미지 – Giona

    +0

    대신 코드를 추가하십시오 ? 경계 상자에는 다른 수레가 없습니다 .. 이해가되지 않습니다. 무엇을 성취하려고합니까? – Andrew

    +0

    #main 블록에 "float : left"블록을 추가하고 플로트를 clearint 할 수 없습니다. 간단한 데모를 위해 단락에 명확하게 추가했습니다. –

    답변

    0

    는 해결 :

    #main {overflow: hidden;} 
    

    또는

    #main {overflow: auto;} 
    

    감사에 : 당신이 단락의 왼쪽을 취소 할 이유 Why is this clear:both acting globally?

    관련 문제