div 内部设置 padding : 5px; 后,IE7下div宽度发生变化,求解决。
三栏布局中间的div没设固定宽度。<divid="companyInfoBox"class="subPanel"><h2><ahref="#"class="more">M...
三栏布局中间的div没设固定宽度。
<div id="companyInfoBox" class="subPanel">
<h2><a href="#" class="more">More Info</a>Our Story</h2>
<div id="companyInfoContent">
<p class="first">Sunny Packaging is a professional supplier of cosmetic packaging,we have many years experience in the field.We have a fully integrated system that oversees from design,tooling,production and decoration.</p>
<p>Our main products are cream jar,lotion bottle,airless bottle,click pen, aluminum container,perfume bottle.We also supply PET bottle,glass bottle, plastic cap, lotion pump,perfume sprayer, trigger sprayer&tube,along with a variety of other high quality cosmetic packaging.</p>
<p>Excellent and stable quality,fast and efficient service,reasonable and competitive price is our business capital.We are expecting to developing and cooperation with the customers all over the world.</p>
</div>
</div>
/----------------------------------------------------- css ------------------------------/
#midbox #companyInfoBox h2
{
height:50px;
line-height:50px;
color:#826F4E;
float:left;
width:100%;
}
.more
{
float:right;
}
//-------------------------------- 我想让 div #companyInfoContent 中的文字设置内边距 padding:5px; 好让文字距离边框有一定的空白。但是设置后,IE下的div宽度发生变化,Google Chrome下div正常,宽度不变。
#midbox #companyInfoBox #companyInfoContent
{
float:left;
border:2px dotted #826F4E;
margin-top:5px;
background-color:#E3DEA4;
word-wrap:break-word;
}
#midbox #companyInfoBox p
{
color:#2e2e2e;
line-height:20px; /*行间距 */
margin-top:10px;
}
求高手指教,如何保证IE下 div加padding后,div宽度不变。 展开
<div id="companyInfoBox" class="subPanel">
<h2><a href="#" class="more">More Info</a>Our Story</h2>
<div id="companyInfoContent">
<p class="first">Sunny Packaging is a professional supplier of cosmetic packaging,we have many years experience in the field.We have a fully integrated system that oversees from design,tooling,production and decoration.</p>
<p>Our main products are cream jar,lotion bottle,airless bottle,click pen, aluminum container,perfume bottle.We also supply PET bottle,glass bottle, plastic cap, lotion pump,perfume sprayer, trigger sprayer&tube,along with a variety of other high quality cosmetic packaging.</p>
<p>Excellent and stable quality,fast and efficient service,reasonable and competitive price is our business capital.We are expecting to developing and cooperation with the customers all over the world.</p>
</div>
</div>
/----------------------------------------------------- css ------------------------------/
#midbox #companyInfoBox h2
{
height:50px;
line-height:50px;
color:#826F4E;
float:left;
width:100%;
}
.more
{
float:right;
}
//-------------------------------- 我想让 div #companyInfoContent 中的文字设置内边距 padding:5px; 好让文字距离边框有一定的空白。但是设置后,IE下的div宽度发生变化,Google Chrome下div正常,宽度不变。
#midbox #companyInfoBox #companyInfoContent
{
float:left;
border:2px dotted #826F4E;
margin-top:5px;
background-color:#E3DEA4;
word-wrap:break-word;
}
#midbox #companyInfoBox p
{
color:#2e2e2e;
line-height:20px; /*行间距 */
margin-top:10px;
}
求高手指教,如何保证IE下 div加padding后,div宽度不变。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询