2012-06-22 4 views
0

모두 안녕 내가 가진 내가 콘텐츠의 권리를 일부 내용을 삽입 할 경우 같은 문제가이폭 권리

<html> 
<head> 
<style type="text/css"> 
body {  
font-family:arial,helvetica,sans-serif;  
font-size:12px; background-color: blue; 
} 

**#wrapper {   
width:900px;   
margin:0px auto;   
border:1px solid #bbb;  
padding:10px; background-color: pink; 
}** 

#header 
{  
border:1px solid #bbb;  
height:80px;   
padding:10px; 
} 
#content 
{  
margin-top:10px;   
padding-bottom:10px;  
} 
#content div 
{  
padding:10px;  
border:1px solid #bbb;  
float:left; 
} 
**#images 
{ 
position:relative; 
top:0px; 
}** 
#content-left 
{  
width:380px;  
}  
**#content-right 
{ 
position:relative; 
top:0px;   
margin-left:10px;  
width:534px;  
}** 
#footer 
{  
float:left;  
margin-top:10px;   
margin-bottom:10px;  
padding:10px;  
border:1px solid #bbb;  
width:878px;  
} 
#bottom 
{  
clear:both;  
text-align:right; 
} 



</style> 
</head> 

<body> 
<div id="wrapper"> 
<div id="header">Header</div> 
<div id="content">  
<div id="content-left"></div>  
**<div id="content-right"><div id="images"><img src="pics02.jpg"  
width="300px;height="900px" /></div>** 
</div> 
</div> 
<div id="footer"></div> 
<div id="bottom"></div> 
</div> 
</body> 
</html> 

같은 HTML 코드 콘텐츠가 콘텐츠의 너비보다 크다면 오른쪽 첫 번째 콘텐츠 권한이 확장되어야합니다. 그러면 래퍼는을 확장해야하지만 이쪽에서 일어나지는 않으며 래퍼에서 나옵니다. 누구든지 진행 방법을 안내 할 수 있습니까?

+0

대답 –

답변

1

콘텐츠의 너비가 고정되어 있습니다. 그래서 실 거예요! 높이를 조정할 수 있지만 너비를 조정하지 않을 수 있습니다 .. 콘텐츠 너비의 최소 너비를 설정하려면 최소 너비 속성을 사용할 수 있습니다 ... http://www.w3schools.com/cssref/pr_dim_min-width.asp

+0

을 받아 들여야하지만, 너비가 더 크면 콘텐츠 오른쪽이 콘텐츠 왼쪽 아래에 배치됩니다. 확대 또는 축소하면 콘텐츠도 바뀝니다. 먼저 답장을 보내 주시면 감사하겠습니다. – satish

+0

! 오버플로하는 div에 그런 종류의 콘텐츠를 추가하고 싶습니다. ?? CSS에서 우리는 고정 된 구조를 만들고 그 안에 내용을 넣습니다. 콘텐츠 크기는 상위 컨테이너의 차원 범위 내에서 변경 될 수 있지만 그 이상이 아닙니다. 나쁜 CSS 사례입니다. 원한다면 초기 단계에서 content-right div의 너비를 늘릴 수 있습니다. –

+0

그래서 콘텐츠에 따라 너비를 동적으로 늘릴 방법이 없습니다. 콘텐츠의 너비 크기를 조정해야하고 해당 콘텐츠에 표시해야합니다. 콘텐츠를 동적으로 조정할 수있는 방법이 있다면 바로 업데이트하십시오. 고마워요. – satish