Specification:
产品名称、产品价格和季节应在表内。产品名称和产品价格都是文本框,标签名分别为name和price。季节是一个下拉框,标签名为season。下拉框将具有以下值:
·夏季-夏季销售
*新年-新年促销
·清除-清除销售
产品名称不应为空,只应包含字母或空格。price文本框不能是空的,并且应该是一个值大于零的数字。
表应该是margin-left与35%对齐,以及外部border-style of solid 5px和30% width。元素和边框之间的空间必须是10px。
table {
border-style: solid;
border-spacing: 10px;
border-width: 5px;
margin-left: 35%;
width: 30%;
}<table>
<tr>
<td>Product Name</td>
<td><input type="text" name="name" id="name" required pattern="[a-zA-Z ]+"></td>
</tr>
<tr>
<td>Product Price</td>
<td><input type="number" name="price" id="price" required min="1"></td>
</tr>
<tr>
<td>Season</td>
<td>
<select id="season" name="season">
<option value="summer">SUMMER SALE</option>
<option value="newyear">NEW YEAR SALE</option>
<option value="clearance">CLEARANCE SALE</option>
</select>
</td>
</tr>
</table>
---------------------------------------------------------------Error-----------
testWeb(jspackage.JSAssignmentDiscount):
Table tag should have 3 rows and check with the requirements for CSS for table and tr
false发布于 2017-08-23 12:43:36
将此添加到您的css中,此错误将得到解决。
tr,td{
padding-left: 10px;
padding-top: 10px;
padding-right: 10px;
padding-bottom: 10px;
border-style: solid;
border-color: black;
border-width: 2px;
}https://stackoverflow.com/questions/45340214
复制相似问题