停止滚动最后的图像在html



我有以下html-

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
   <style type="text/css">
    .style1 {
        width: 2454px;
    }
   </style>
</head>
<body>
<table width="5964" border="0" cellspacing="13">
  <tr>
   <td width="3484"><img src="images/square.jpg" width="850" height="534" /
   <img src="images/circle.jpg" width="850" height="534" /></td>
   <td class="style1"><img src="images/rectangle.png" width="1134" height="534" /></td>
  </tr>
</table>
</body>

当我在IE中查看此页面时,水平滚动条比它应该走得更远,而我需要它在最后一个图像rectangle.png上停止。

我试图改变CSS使列的宽度设置为自动,但这没有工作,也是表的宽度。我怎样才能避开这个问题呢?

第一列的宽度为3444px,矩形图像的宽度为1134px。所以即使你改变了CSS的宽度,它的最小值也是4618px。(大约是我当前屏幕宽度的4倍)。

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
#container {
width:100%; // set width to what you want
margin:0 auto; // if you want to center on page
    }
</style>
</head>
<body>
<div id="container">
<table width="5964" border="0" cellspacing="13">
<tr>
<td width="3484"><img src="images/square.jpg" width="850" height="534" /
<img src="images/circle.jpg" width="850" height="534" /></td>
<td><img src="images/rectangle.png" width="1134" height="534" /></td>
</tr>
</table>
</div>
</body>

试试这个,看看它是否对你有帮助,如果你的内容包含在屏幕上,它应该有助于滚动。我以前用这种方法解决过同样的问题。祝你好运。

最新更新