Home  >  Article  >  Web Front-end  >  Please tell me about the style issue_html/css_WEB-ITnose

Please tell me about the style issue_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:14:451193browse

[img=http://b109.photo.store.qq.com/psb?/a44cf879-0bc5-47f8-ab7a-978f408b23c3/RGqOSZW7r0OBWastlQfcjOggsxTaDRU.i4vVZPE5psI!/b/dF*gBUF.AwAA&bo=ugByAO4!][ /img]

<select class="selguige" id="specId${st.index}" name="specId${st.index}" onchange="changeprice(${st.index},this.options[this.options.selectedIndex].value)">									  <s:iterator value="#commodity.specList" id="spec" status="st2">										<option title="${spec.specName}" value="${spec.specid},${spec.salePrice},${spec.originalPrice}"style="font-size:10px;">${spec.specName}</option>									  </s:iterator>									  </select>


This is the style

.selguige{	height:20px;	margin-left:-1px;	font-size: 12px;	color: #3e3e3e;	max-width: 100px;	overflow:hidden;	width:expression(this.offsetWidth > 100? "100px": this.offsetWidth + "px" ); 	_width: expression(this.offsetWidth > 100 ? "100px" : this.offsetWidth + "px"); }


Why do my words overlap? Other browsers can work, but IE8 cannot, please give me some advice!


Reply to discussion (solution)

In css, overflow: hiedden means that when the length is not enough, the content that cannot be displayed is automatically hidden. Remove the overflow or lengthen the width. ^

In CSS, overflow:hiedden means that when the length is not enough, the content that cannot be displayed is automatically hidden. Remove the overflow or lengthen the width^

The width cannot be added!
overflow:hiedden is still the same even after removing it!

After many experiments, I found that the settings you set in css cannot accommodate all characters. So you can reduce the font-size or increase the max-width.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn