2013-03-08 7 views
2

div가 왼쪽 으로 부동화되어 있고 고정되어 있지만 그 옆에 또 다른 div float (즉, 두 개의 빈 칸이 있지만 맨 왼쪽은 그대로 남아 있습니다. 페이지가 스크롤 될 때).왼쪽 부동 소수점으로 된 부동 소수점 열

지금까지 내가, fixed and position don't mix을 말할 수 있었고, 하나는 추가, 예를 들어,이 작업을 수행 할 수 있습니다 같은 마진 왼쪽이를 달성하기 위해 두 번째 (가장 오른쪽) 사업부를 토륨 (like this)

하지만, 나는 여기 가볍게 찌르거나 소홀히하기 위해 여기에 가져 오는 희미한 희망을 간직하고 있습니다.

그래서, 나는 여백 왼쪽 태그를 취할 수 있도록 여기에 CSS를 변경하려면 그냥 #body는 #menu 하나에 최대 떠 DIV 것을 가지고

<!DOCTYPE html> 
    <html> 
    <head> 
    <style> 
    #menu 
    { 
    float:left; width: 10em; position: fixed; 
    } 

    #body 
    { 
    float:left; maring-left: 10em; 
    } 

    #footer 
    { 
    clear:both; 
    } 
    </style> 
    </head> 

    <body> 
    <div /*main div others are nested in*/> 

    <div id="menu"> 
    menu<br/>menu<br/>menu<br/>menu<br/>menu<br/>menu<br/>menu<br/>menu<br/>menu<br/>menu<br/>menu<br/>menu 

    </div> 
    <div id="body"> 
    <p> 
    body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body 
    </p> 

    <div id="footer"> 
    footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer 
    </div> 
    </div> 
    </div> 
    </div> 
    </body> 
    </html> 

감사합니다 어떤 도움이라도! 여백에

+0

maring 왼쪽 여백에서 왼쪽 유일한 방법 – Oliver

+0

은 여백 왼쪽 함께 BEI한다 – AddiktedDesign

답변

0

맞춤법 오류가 TTP 왼쪽 : //jsfiddle.net/BYMZD/

관련 문제