Home  >  Article  >  Web Front-end  >  求前端大神看看,我这table选项卡在IE里没有效果,样式也乱了。在其他浏览器都正常,一直找不出原因。_html/css_WEB-ITnose

求前端大神看看,我这table选项卡在IE里没有效果,样式也乱了。在其他浏览器都正常,一直找不出原因。_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:38:331586browse

谷歌
IE

<!----------------------------二手设备->出售信息------------------->                                    <div class="box" style="margin-top:40px;">						    			    <div id="tab" style="width:400px;">					<div class="shebei">					<div class="sb">二手设备</div>					<ul class="tab_menu" style="margin-left:95px;width:400px;">				    	<li class="F E">出售信息</li>				    	<li class="E selected">泵车</li>				        <li class="E">搅拌车</li>				        <li class>其他</li>				    </ul>				    </div>				    <div class="tab_box">				    	<div>				    					    	</div>				    					    	<div>				    	<volist name="handbengche" id="vo">				    	<a href="__URL__/selldetails?id={$vo[id]}"><p>[{$vo[oripurdate]}]<span style="margin-left:60px;">{$vo[name]}</span><span style="float:right;">[{$vo.productlocated}]</span></p><br></a>							            </volist>				    	</div>				        <div class="hide">				        <volist name="handjiaobanche" id="vo">				        <a href="__URL__/selldetails?id={$vo[id]}"><p>[{$vo[oripurdate]}]<span style="margin-left:60px;">{$vo[name]}</span><span style="float:right;">[{$vo.productlocated}]</span></p><br></a>				         </volist>				        </div>				        <div class="hide">				        <volist name="handqita" id="vo">				        <a href="__URL__/selldetails?id={$vo[id]}"><p>[{$vo[oripurdate]}]<span style="margin-left:60px;">{$vo[name]}</span><span style="float:right;">[{$vo.productlocated}]</span></p><br></a>				        </volist>				        </div>				    </div>				</div>			    												<!----------------------------二手设备->求购信息------------------->				<div id="tab" style="margin-top:20px;margin-left: 430px;width:400px;">				    <div class="shebei">				   					<ul class="tab_menu" style="margin-left:20px;margin-top:-20px;width:400px;">				    	<li class="F E">求购信息</li>				    	<li class="E selected">拖泵</li>				    	<li class="E">泵车</li>				        <li class="E">搅拌车</li>				        <li>其他</li>				    </ul>				    </div>				    <div class="tab_box">				    	<div></div>				    	<div></div>				    				    					    	<div>				    	<volist name="handqiubengche" id="vo">				    	<a href="__URL__/rentinfo?id={$vo.id}"><p>[{$vo[publishtime]|date="Y-m-d",###}]<span style="margin-left:60px;">{$vo[name]}</span><span style="float:right;">[{$vo.location}]</span></p><br></a>							            </volist>				    	</div>				        <div class="hide">				        <volist name="handqiujiaobanche" id="vo">				        <a href="__URL__/rentinfo?id={$vo.id}"><p>[{$vo[publishtime]|date="Y-m-d",###}]<span style="margin-left:60px;">{$vo[name]}</span><span style="float:right;">[{$vo.location}]</span></p><br></a>				         </volist>				        </div>				        <div class="hide">				        <volist name="handqiuqita" id="vo">				        <a href="__URL__/rentinfo?id={$vo.id}"><p>[{$vo[publishtime]|date="Y-m-d",###}]<span style="margin-left:60px;">{$vo[name]}</span><span style="float:right;">[{$vo.location}]</span></p><br></a>				        </volist>				        </div>				    </div>				</div>	      				      					<!---------------------------------------二手车估价计算器-------------------------------->								<div class="quick_search">						<div class="search1">							    二手车估价计算器						</div>						<div class="gujia">							<p style="color:#646464;font-size: 14px; margin-top: 20px;margin-left: 10px;">二手车车价评估</p>							<input value="  选择品牌和车型" class="i1">							<input value="  车辆入手时间" class="i1">							<input value="估一下" class="i2" type="button">						</div>					</div>								   </div>


回复讨论(解决方案)

id=tab改成class=tab,不建议margin-left:430px;可以让class=tab的样式改成float:left;然后清除浮动

id=tab改成class=tab,不建议margin-left:430px;可以让class=tab的样式改成float:left;然后清除浮动

已经换成了float:left为什么样式还是乱的?js效果有了

感觉像是没有固定宽度造成的

建议你试试固定下块宽高,文字不换行.

建议你试试固定下块宽高,文字不换行.

已经给了宽度了啊,为什么那个地名还是下去了。

在设计盒子的时候,多考虑兼容性。

二手设备

                    

                            
  • 出售信息

  •                         
  • 泵车

  •                         
  • 搅拌车

  •                         
  • 其他

  •                     

因为sb是div,是块元素。ul,li又是浮动元素,也是就是内层一旦超出容器,就会发生不可预知的情况。
因此:可设ul的宽度大于外层div(也就是你的class=shebei这个),而class=shebei这个div要设置:overflow:hidden

你直接把网址发来,用firebug帮你调一下吧!一看代码多就头晕,不爱看!

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