我有一个用于向数据库添加记录的表单。表单完美无缺,但我正在尝试为背景添加一些颜色,以便从页面的其余部分中脱颖而出。我正在使用的CSS让我可以设置表单大小,边框重量等等,但我没有改变背景颜色。
<p class="first"><span class="error">* required field.</span></p>
<form action="http://www.oldgamer60.com/Project/NewProject.php" method="post">
<div class="fieldset">
<fieldset>
Project: <input type="text" name="Project" value="<?php if(isset($Project)){ echo $Project; } ?>">
<span class="error">* <?php if(isset($ProjectErr)){ echo $ProjectErr; } ?></span>
<br><br>
Client: <input type="text" name="Client" value="<?php if(isset($Client)){ echo $Client; } ?>">
<span class="error">* <?php if(isset($ClientErr)){ echo $ClientErr; } ?></span>
<br><br>
LastName: <input type="text" name="LastName" value="<?php if(isset($LastName)){ echo $LastName; } ?>">
<span class="error">* <?php if(isset($LastNameErr)){ echo $LastNameErr; } ?></span>
<br><br>
DateReceived: <input type="text" name="DateReceived" value="<?php if(isset($DateReceived)){ echo $DateReceived; } ?>">
<span class="error">* <?php if(isset($DateReceivedErr)){ echo $DateReceivedErr; } ?></span>
<br><br>
<input type="submit" name="submit" value="Submit">
</fieldset>
</div>
</form>
div.fieldset {
border: solid black thin;
width: 500px;
background-color: #3ffffb0;
margin: auto;
}
fieldset {
border: none;
padding: 10;
}
input.textbox {
width: 400px;
float: right;
}
fieldset p {
clear: both;
padding: 10px;
}
答案 0 :(得分:10)
答案 1 :(得分:0)
你的css中的background-property中有一个太多的数字。
应该是:
div.fieldset {
border: solid black thin;
width: 500px;
background-color: #3ffffb;
margin: auto;
}