选择未在调查表单上正确显示的框

时间:2017-12-29 16:25:43

标签: html css

​div{
  padding: 10px;
  }
<div>
        Occupation: <select name="occupation">
       <option value="student1">Student (high school or less)</option>
       <option value = "student2">University student</option>
       <option value = "unemployed">Unemployed</option>
       <option value="intern">Internship</option>
       <option value="full-time">Full Time Job</option>
       <option value="retired">In Retirement</option>
     </div>
       
       <div>
        What do you like the most about our product? <select name="likes">
         <option value="look">The Look</option>
         <option value="functionality">Functionality</option>
         <option value="usefulness">Usefulness</option>
         <option value="users">Other Users</option>
         
       </div>

我不确定我做错了什么,为什么第一个选择框工作而另一个没有 这就是它的样子: enter image description here

2 个答案:

答案 0 :(得分:0)

您缺少第一个<select>的结束标记:

​div{
  padding: 10px;
  }
<div>
     Occupation: 
    <select name="occupation">
       <option value="student1">Student (high school or less)</option>
       <option value = "student2">University student</option>
       <option value = "unemployed">Unemployed</option>
       <option value="intern">Internship</option>
       <option value="full-time">Full Time Job</option>
       <option value="retired">In Retirement</option>
      </select> <!-- was missing -->
     </div>
       
       <div>
        What do you like the most about our product? <select name="likes">
         <option value="look">The Look</option>
         <option value="functionality">Functionality</option>
         <option value="usefulness">Usefulness</option>
         <option value="users">Other Users</option>
         
       </div>

答案 1 :(得分:0)

您应该关闭divselect代码。

​div{
  padding: 10px;
  }
<div>
        Occupation: <select name="occupation">
       <option value="student1">Student (high school or less)</option>
       <option value = "student2">University student</option>
       <option value = "unemployed">Unemployed</option>
       <option value="intern">Internship</option>
       <option value="full-time">Full Time Job</option>
       <option value="retired">In Retirement</option>
       </select>
     </div>
       
       <div>
        What do you like the most about our product? <select name="likes">
         <option value="look">The Look</option>
         <option value="functionality">Functionality</option>
         <option value="usefulness">Usefulness</option>
         <option value="users">Other Users</option>
         </select>
       </div>
</div>