作者liuyyss (千月星痕)
看板Web_Design
標題Re: [問題] dreamweaver 表格的問題
時間Thu Mar 18 23:03:21 2010
在原始碼最上面加這行
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
(用DW編網頁應該預設就有加了)
在head裡用CSS設定
<style type="text/css">
table { border-collapse: collapse;}
</style>
或是在table標籤裡用style屬性設定,像這樣:
<table style="border-collapse:collapse;" >
CSS算是目前網頁美工主流,可以找書看搭配上網查資料好好學一學。
DW裡也有設定樣式表的功能,但我對它不太熟XD
看過你的網頁了 你td指定了太寬的width 內容和邊框間自然就會留白了
還有form也夾錯了,你這樣寫不會有作用的,
id、password和button都要在同一個form裡才行@@
把紅色碼拿掉 放到綠色碼
<form id="form1" name="form1" method="post" action="">
<table align="right" cellpadding="0" cellspacing="0" class="style2">
<tr>
<td
width="47" nowrap="nowrap"><p>帳號</p>
<p>密碼</p></td>
<td
width="95" align="left" nowrap="nowrap">
<form id="form1"
name="form1" method="post" action="">
<label>
<input name="id" type="text" class="style1" id="id" size="10" />
<br />
<input name="password" type="text" class="style1" id="password"
size="10" />
</label>
</form> </td>
</tr>
<tr>
<td nowrap="nowrap"> </td>
<td width="95" align="left" nowrap="nowrap"><form id="form2"
name="form2" method="post" action="">
</form> </td>
</tr>
<tr>
<td colspan="2"
nowrap="nowrap"><form id="form3" name="form3"
method="post" action="">
<div align="center">
<input type="submit" name="button" id="button" value="送出" />
</div>
</form> </td>
</tr>
<table>
</form>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.37.177.155
※ 編輯: liuyyss 來自: 114.37.177.155 (03/18 23:14)
※ 編輯: liuyyss 來自: 114.37.177.155 (03/19 00:18)
※ 編輯: liuyyss 來自: 114.37.177.155 (03/19 00:23)
※ 編輯: liuyyss 來自: 114.37.177.155 (03/19 00:24)
→ liuyyss:我得去睡囉~~ 03/19 00:25
→ liuyyss:還有 你style2裡加的這行 03/19 00:27
→ liuyyss:<table style="border-collapse:collapse;" 也是錯的@@ 03/19 00:28
→ liuyyss:拿掉它 反正你border也設成0了 03/19 00:30
推 Feis:那些<td> 內的 <p> 拿掉比較好 03/19 01:30
推 iamqwqw:感謝大大支援..我後來全部放在from裡面就ok了!! 03/19 13:49