尝试按照我想要的方式整理文本字段。 我想要的是: -username feild在顶部 - 第一个和最后一个名字在下面并且彼此相邻 -password并确认underneth name并且彼此相邻
我是html的新手并且无法组织它。不确定使用div,section等。
还希望所有内容都居中并且不对齐左边,我想在所有文本字段下面添加一个图像,并让add child btn在其下面。
这是代码:
<form>
<label-popup for="contact">
<span-popup>USERNAME *</span-popup>
<input type="text" id="contact" />
</label-popup>
</form>
<form>
<div>
<label-popup for="company">
<span-popup>FIRST NAME *</span-popup>
<input type="text" id="company" />
</label-popup>
<label-popup for="contact">
<span-popup>LAST NAME *</span-popup>
<input type="text" id="contact" />
</label-popup>
<label-popup for="contact">
<span-popup>PASSWORD *</span-popup>
<input type="text" id="contact" />
</label-popup>
<label-popup for="contact">
<span-popup>CONFIRM PASSWORD *</span-popup>
<input type="text" id="contact" />
</label-popup>
</div>
</form>
答案 0 :(得分:0)
我建议您使用表而不是div或部分,这对您来说很容易。 我将为您的设计提供简单的表格结构。
<table border="0" align="center">
<tr>
<td>User Name <input type="text" /></td>
</tr>
<tr>
<td>First Name <input type="text" /> </td>
<td>Last Name <input type="text" /> </td>
</tr>
</table>
现在在此表中添加您的字段。