我的表格/网页宽度为1250px,居中。但对于像我这样的1024像素宽屏幕,我必须滚动“右”才能看到整个页面。我希望它为我的尺寸的分辨率居中,所以我不必滚动。中心表(表格宽度>屏幕分辨率)
这里是我的代码:
<html>
<head>
<title>blah</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<table id="Table_01" width="1250" height="1500" border="0" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="8">
<img src="images/site_layout_01.gif" width="148" height="1500" alt=""></td>
<td colspan="9">
<img src="images/header-image.jpg" width="968" height="336" alt=""></td>
<td rowspan="8">
<img src="images/site_layout_03.gif" width="134" height="1500" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/site_layout_04.gif" width="968" height="71" alt=""></td>
</tr>
<tr>
<td rowspan="2">
<img src="images/site_layout_05.gif" width="42" height="201" alt=""></td>
<td>
<img src="images/review1.jpg" width="195" height="84" alt=""></td>
<td rowspan="2">
<img src="images/site_layout_07.gif" width="40" height="201" alt=""></td>
<td>
<img src="images/review2.jpg" width="195" height="84" alt=""></td>
<td rowspan="2">
<img src="images/site_layout_09.gif" width="40" height="201" alt=""></td>
<td>
<img src="images/review3.jpg" width="195" height="84" alt=""></td>
<td rowspan="2">
<img src="images/site_layout_11.gif" width="40" height="201" alt=""></td>
<td>
<img src="images/review4.jpg" width="195" height="84" alt=""></td>
<td rowspan="2">
<img src="images/site_layout_13.gif" width="26" height="201" alt=""></td>
</tr>
<tr>
<td>
<img src="images/site_layout_14.gif" width="195" height="117" alt=""></td>
<td>
<img src="images/site_layout_15.gif" width="195" height="117" alt=""></td>
<td>
<img src="images/site_layout_16.gif" width="195" height="117" alt=""></td>
<td>
<img src="images/site_layout_17.gif" width="195" height="117" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/main-image.jpg" width="968" height="161" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/site_layout_19.gif" width="968" height="9" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/obama_quote.gif" width="968" height="63" alt=""></td>
</tr>
<tr>
<td colspan="9">
<img src="images/site_layout_21.gif" width="968" height="659" alt=""></td>
</tr>
</table>
</body>
</html>
如何实现这一目标?
你能澄清你的问题?没有办法将1250像素宽的桌子居中放置,以便在1024像素宽的屏幕上完全可见,以便不必滚动。 – Bill 2012-04-29 06:06:38
对于一个1024像素宽的显示器,我希望它的中心和226px的边(每边113px)可以下地狱我所关心的。那就是我的意思 – user1363785 2012-04-29 06:13:28
你能用这个javascript吗?如果你能... – Endophage 2012-04-29 07:58:49