2013-11-01 3 views
0

divdiv에 머무르고있는 문제가 있습니다.내 DIV는 내 말을 들어 본적이 없어

어떤 위치에 상관없이 div은 페이지 상단으로 이동하거나 표시되지 않습니다.

CSS :

.content { 
    width:100%; 
    background: #F0F0F0; 
    border: 1px solid #CCC; 
    height: 1000px; 
    margin: 0px auto; 
} 

.contentinside { 
    postition: relative; 
    margin: auto; 
    width: 960px; 
    height: 200px; 
    background-color:#000099; 
} 

HTML :

<div class="content"> 
<div class="contentinside">something here</div> 
+0

콘텐츠 div를 닫지 않은 것 외에 오타도 있습니다. 위치 : 친척이어야하고 포지션 : 상대가 있어야합니다. –

+4

스타일에'obey : me'를 추가해야합니다. –

+2

걱정하지 마십시오. 여자 친구와 같은 이야기입니다. –

답변

0

첫 번째 div 태그를 닫아야합니다. 이제

.content { 
    position: relative; 
    /* rest of your styles */ 
} 

.contentinside { 
    position: absolute; 
    /* rest of your styles */ 
} 

의 위치를 ​​:

<div class="content"></div> 
<div class="contentinside">something here</div> 
0

당신은

<div class="content"> 
<div class="contentinside">something here</div></div> 
0

이 시도 두 번째 DIV의 끝없는 below..you 같은 다른 사업부 내에서 첫 번째 사업부를 넣어 필요 .contentinside는 .content와 관련이 있습니다. 물론 닫는 태그를 제대로 확인하고 오타 등을 확인하십시오.

관련 문제