各位前輩好,我來詢問網頁排版的問題,如下圖:
程式碼:
<form name="form1" method="post" onSubmit="return checkpass();">
<div style="position:absolute;width:50%;left:30%;">
<fieldset>
<legend>修改密碼</legend>
<div>
<img src="../images/password.jpg" style="float:left"><br><b><%=session("name1")%>(<%=session("employeecode")%>)</b><br>
<% if session("check") = "over" then %>
<font color="red"><b>密碼已到期</b></font><br><br>
<% elseif session("check") = "space" then %>
<font color="red"><b>密碼不可為空白</b></font><br><br>
<% else %>
<font color="blue">離密碼到期日還有<%=session("diffday")%>天</font><br><br>
<% end if %>
輸入新密碼 <input type="text" name="newpass" id="newpass" value="" maxlength="12" onKeyUp="checkpass()" size="10" autocomplete="off"><br>
新密碼確認 <input type="text" name="cfmpass" id="cfmpass" value="" maxlength="12" size="10" autocomplete="off" onKeyUp="checkpass()"><br>
<div id="wordcount" style="color:red">請輸入密碼!</div><br><br>
<% if request("act") = "over" or session("check") = "over" then %>
<font color="#FF0000">*新密碼超過180天未修改,需修改密碼方可登入</font><br>
<% end if %>
*新密碼不得為空白<br>
*新密碼不可與目前密碼相同<br>
*新密碼需包含英文跟數字共6~12個字元<br><br>
</div>
<div style="position:relative;text-align: center;">
<input type="submit" name="cmd" value="送出" onClick="checkpass2()">
<input type="button" name="close" value="取消" onClick="window.location.href='index.asp'">
</div>
</fieldset>
</div>
</form>
請問我該怎麼調整,才可以將紅框的區塊,跟上面的字體對齊呢?
謝謝!
等待更好的答案之前
可以用最古老的table擋一下
<form name="form1" method="post" onSubmit="return checkpass();">
<div style="position:absolute;width:50%;left:30%;">
<fieldset>
<legend>修改密碼</legend>
<div>
<table>
<tr><td>
<img src="../images/password.jpg" style="float:left"><br><b><%=session("name1")%>(<%=session("employeecode")%>)</b><br></td>
<td>
<% if session("check") = "over" then %>
<font color="red"><b>密碼已到期</b></font><br><br>
<% elseif session("check") = "space" then %>
<font color="red"><b>密碼不可為空白</b></font><br><br>
<% else %>
<font color="blue">離密碼到期日還有<%=session("diffday")%>天</font><br><br>
<% end if %>
輸入新密碼 <input type="text" name="newpass" id="newpass" value="" maxlength="12" onKeyUp="checkpass()" size="10" autocomplete="off"><br>
新密碼確認 <input type="text" name="cfmpass" id="cfmpass" value="" maxlength="12" size="10" autocomplete="off" onKeyUp="checkpass()"><br>
<div id="wordcount" style="color:red">請輸入密碼!</div><br><br>
<% if request("act") = "over" or session("check") = "over" then %>
<font color="#FF0000">*新密碼超過180天未修改,需修改密碼方可登入</font><br>
<% end if %>
</td>
</tr>
<tr><td></td><td>
*新密碼不得為空白<br>
*新密碼不可與目前密碼相同<br>
*新密碼需包含英文跟數字共6~12個字元<br><br>
</td>
</div>
<div style="position:relative;text-align: center;">
<input type="submit" name="cmd" value="送出" onClick="checkpass2()">
<input type="button" name="close" value="取消" onClick="window.location.href='index.asp'">
</div>
</fieldset>
</div>
</form>