0

こんにちは、私はこのようなhtmlコードを持っています

<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>

コンテンツにコンテンツを正しく挿入し、コンテンツがコンテンツの幅を超えている場合、最初のコンテンツを右に展開し、次にラッパーを展開する必要がありますが、これはそこでは発生せず、ラッパーから出てきます。誰もが私に進む方法を教えてくれますか?

4

1 に答える 1

1

コンテンツの幅を修正しました-右。だからそれはしません!高さは調整できますが、幅は調整されません。min-widthプロパティを使用して、コンテンツの最小幅を設定できます-right ... http://www.w3schools.com/cssref/pr_dim_min-width.asp

于 2012-06-22T07:30:21.943 に答える