我正在为我正在开发的小型网站构建一个选项页面,但我遇到了一个相当有趣的错误。我的表格的底部似乎突然切断了100%的浏览器高度,如下图所示:
http://oi39.tinypic.com/fm8cia.jpg
只要我刷新页面(F5),表单就会完成,一切正常,如下图所示:
http://oi40.tinypic.com/9zqerc.jpg
在摆弄了一段时间后,我注意到问题似乎与我的标签有关,因为当我删除它时,问题就会消失。
以下是我的表单标记的代码:
<form action="r_options.php" method="post">
<label id="edit_account_label"><b>OPT_MINADMIN</b> - Minimum level to view the control panel.</label>
<select name = "opt_minadmin" style="float:right;">
<option value = "<?php echo $opt['OPT_MINADMIN']; ?>"><?php echo $opt['OPT_MINADMIN']; ?></option>
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
</select>
<br><br>
<label id="edit_account_label"><b>OPT_MINEN</b> - Minimum level to edit the manager/homepage notes.</label>
<select name = "opt_minen" style="float:right;">
<option value = "<?php echo $opt['OPT_MINEN']; ?>"><?php echo $opt['OPT_MINEN']; ?></option>
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
</select>
<br><br>
<label id="edit_account_label"><b>OPT_MINADD</b> - Minimum level to add users to the system.</label>
<select name = "opt_minadd" style="float:right;">
<option value = "<?php echo $opt['OPT_MINADD']; ?>"><?php echo $opt['OPT_MINADD']; ?></option>
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
</select>
<br><br>
<label id="edit_account_label"><b>OPT_MINEDIT</b> - Minimum level to edit users in the system.</label>
<select name = "opt_minedit" style="float:right;">
<option value = "<?php echo $opt['OPT_MINEDIT']; ?>"><?php echo $opt['OPT_MINEDIT']; ?></option>
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
</select>
<br><br>
<label id="edit_account_label"><b>OPT_MINDELETE</b> - Minimum level to delete users in the system.</label>
<select name = "opt_mindelete" style="float:right;">
<option value = "<?php echo $opt['OPT_MINDELETE']; ?>"><?php echo $opt['OPT_MINDELETE']; ?></option>
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
</select>
<br><br>
<label id="edit_account_label"><b>OPT_MINPOINT</b> - Minimum level use the attendance system.</label>
<select name = "opt_minpoint" style="float:right;">
<option value = "<?php echo $opt['OPT_MINPOINT']; ?>"><?php echo $opt['OPT_MINPOINT']; ?></option>
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
</select>
<br><br>
<label id="edit_account_label"><b>OPT_MINSG</b> - Minimum level to edit the sales goals.</label>
<select name = "opt_minsg" style="float:right;">
<option value = "<?php echo $opt['OPT_MINSG']; ?>"><?php echo $opt['OPT_MINSG']; ?></option>
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
</select>
<br><br>
<label id="edit_account_label"><b>OPT_MINSCHED</b> - Minimum level to edit the schedule suite.</label>
<select name = "opt_minsched" style="float:right;">
<option value = "<?php echo $opt['OPT_MINSCHED']; ?>"><?php echo $opt['OPT_MINSCHED']; ?></option>
<option value = "1">1</option>
<option value = "2">2</option>
<option value = "3">3</option>
</select>
<br><br>
<label id="edit_account_label"><b>P_NOSHOW</b> - Points given per noshow.</label>
<input type="text" name="p_noshow" value="<?php echo $opt['P_NOSHOW']; ?>" style="width:28px;float:right;" />
<br><br>
<label id="edit_account_label"><b>P_CALLED</b> - Points given for calling in sick.</label>
<input type= "text" name="p_called" value="<?php echo $opt['P_CALLED']; ?>" style="width:28px;float:right;" />
<br><br>
<label id="edit_account_label"><b>P_LEAVE</b> - Points given for employees leaving early.</label>
<input type="text" name="p_leave" value="<?php echo $opt['P_LEAVE']; ?>" style="width:28px;float:right;" />
<br><br>
<label id="edit_account_label"><b>P_LATE</b> - Points given for employees coming in late.</label>
<input type="text" name="p_late" value="<?php echo $opt['P_LATE']; ?>" style="width:28px;float:right;" />
<br><br>
<label id="edit_account_label"><b>P_PUNCH</b> - Points given for employees missing a punch in/out.</label>
<input type="text" name="p_punch" value="<?php echo $opt['P_PUNCH']; ?>" style="width:28px;float:right;" />
<br><br>
<label id="edit_account_label"><b>P_PERIOD</b> - How long the points period is. (in days)</label>
<input type="text" name="p_period" value="<?php echo $opt['P_PERIOD']; ?>" style="width:28px;float:right;" />
<br><br>
<label id="edit_account_label"><b>SESSION_TIMEFUNC</b> - Use the timeout feature?</label>
<select name = "session_timefunc" style="float:right;">
<option value = "<?php echo $opt['SESSION_TIMEFUNC']; ?>"><?php echo $opt['SESSION_TIMEFUNC']; ?></option>
<option value = "true">true</option>
<option value = "false">false</option>
</select>
<br><br>
<label id="edit_account_label"><b>REG_NAME</b> - Who is this software registered to?</label>
<input type="text" name="reg_name" value="<?php echo $opt['REG_NAME']; ?>" style="float:right;" />
<br><br>
<input type="submit" name="submit" value="Update Options" style="margin:auto;" onclick="return confirm('Update Options?')" />
</form>
以下是ID edit_account_label的CSS:
#edit_account_label {
padding-bottom: 10px;
float: left;
}
此问题仅发生在Google Chrome(版本26.0.1410.64 m)中,该代码在Internet Explorer 9中正常运行,没有任何问题。
我为我的草率代码道歉,我不专业。