2011-10-03 27 views
0

滾動最後的圖像,我有以下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使列寬設置爲自動,但這並沒有工作,也是表寬度。我怎樣才能解決這個問題?

+0

我不確定你在做什麼顯式'寬度',但你應該看看寬度的數學。 – swatkins

+0

提示:將'

+0

http://shouldiusetablesforlayout.com – Greg

回答

0

您的第一列的寬度爲3484px,而您的矩形圖像的寬度爲1134px。所以即使你改變了CSS的寬度,最小值也是4618px。 (大約是我當前屏幕寬度的4倍)。

0
<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> 

試試這個,看看它是否可以幫助你,如果你已經包含了屏幕應該與滾動幫助中您的內容。這樣我在過去解決了同樣的問題。希望它有助於好運。

+0

感謝輸入,但它仍然有一個巨大的差距在屏幕結束,任何其他的想法? – Ebikeneser

+0

你是否解決了問題,如果不給我一個問題的網頁鏈接,我會看看我是否可以幫助你。 –