本文介绍了浏览器中表尺寸的不同视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是有关IE和google chrome浏览器中表格尺寸的差异:
我的html代码:

my question is about the difference occurs in table dimensions in IE and google chrome browsers:
my html code :

<tr>
<td colspan="21" width="950" height="284" style="background-color:Black;">

	<div id="features" style="overflow: hidden; width: 950px; ">
		<ul style="removed: relative; margin: 0px auto 0px 0px; removed -3px;  width: 950px; removed 0px; height: 288px;">
				<li style="removed: absolute; removed 0px; removed 0px;  display: none; z-index: 3; opacity: 0; width: 950px;">
                    <img src="images/topbanner1.jpg" alt ="" style="height: 288px; width: 950px"/></li>
				<li style="removed: absolute; removed 0px; removed 0px;  display: none; z-index: 2; opacity: 0; width: 950px;">
                    <img src="images/topbanner2.jpg" alt="" style="width: 950px; height: 288px" /></li>
				<li style="removed: absolute; removed 0px; removed 0px;  display: list-item; z-index: 1; opacity: 1; width: 950px;">
                    <img src="images/topbanner3.jpg" style="width: 950px; height: 288px;" alt=""/></li>

</ul>
</div>

</td>
<td>
<img src="images/spacer.gif" width="1" height="288" alt=""/></td>
	</tr>



和CSS:



and the css:

#features {
			width: 950px;
height: 286px;

/*margin: 0 0 48px 0;
			overflow: scroll; /* Changed to hidden if javascript enabled*/
		}
		#features ul {
				width: 950px;
				height: 286px;
			}

			#features ul li {
				float:  right;
				width: 950px;
				height: 286px;
			}



在IE浏览器中,此td的视图确实为950px
但是当我在谷歌浏览器中查看时,宽度更改为1282px !!!!

请我需要您的帮助来解决我的问题,并知道这种差异背后的原因



the view of this td in IE browser is truly 950px
but when i view it in google chrome the width is change to 1282px!!!!

please i need your help to fix my trouble and know the reason behind this difference

推荐答案

@sarah mm 写道:

你是对的,我解决了这个问题.宽度变为1282px,因为另一个td尺寸已通过函数调用更改
问题不在此td中.

you are right and i solve the problem. the width became 1282px because of another td dimension altered by function call
the problem not in this td.

感谢 @sarah mm 告诉我您的问题已解决.

非常感谢...

Thanks @sarah mm for updating me that your problem is solved.

Thanks a lot...



这篇关于浏览器中表尺寸的不同视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-16 18:29
查看更多