我已经在Photoshop中制作了一个导航栏,并使用Photoshop中的“保存到网络”功能转换为代码,现在导航栏显示正常,但是当我添加其他东西代码时,它只是离开页面,其宽度增加
我的navbar.html
<html>
<head>
<title>Couture Collection</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (Untitled-3) -->
<table id="Table_01" width="1366" height="78" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="5">
<img src="images/navbar_01.png" width="1125" height="21" alt=""></td>
<td colspan="2">
<img src="images/navbar_02.png" width="241" height="21" alt=""></td>
</tr>
<tr>
<td>
<img src="images/navbar_03.png" width="180" height="56" alt=""></td>
<td>
<img src="images/navbar_04.png" width="217" height="56" alt=""></td>
<td>
<img src="images/navbar_05.png" width="272" height="56" alt=""></td>
<td>
<img src="images/navbar_06.png" width="207" height="56" alt=""></td>
<td colspan="2">
<img src="images/navbar_07.png" width="414" height="56" alt=""></td>
<td>
<img src="images/navbar_08.png" width="76" height="56" alt=""></td>
</tr>
<tr>
<td>
<img src="images/spacer.gif" width="180" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="217" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="272" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="207" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="249" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="165" height="1" alt=""></td>
<td>
<img src="images/spacer.gif" width="76" height="1" alt=""></td>
</tr>
</table>
<!-- End Save for Web Slices -->
</body>
</html>
答案 0 :(得分:0)
1125+241 = 1366
和180+217+272+207+414+76 = 1366
因此,如果您添加另一个td
,它将增加您的导航并超过1366px。最好的方法应该是使用真正的HTML + CSS制作导航栏,而不是使用photoshop生成导航栏,因为它使用固定的width
(根本没有响应)