<div class="container">
<table width=100%>
<tr>
<td>
<table width="100%" border="0" cellpadding="1" cellspacing="2" class="taborder">
<tr>
<td height=25 align="left" class="gtab">Your Contact Details</td>
</tr>
<tr align="left">
<td colspan="2" valign="top" class="content">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="link">
<tr>
<td width="224" height="29" bgcolor="#DEECF5"> <div align="right"><font color="#FF0000">*</font>
<form class="form-horizontal">
<div class="form-group">
<b>Title :</b></div></td>
<td width="326" bgcolor="#DEECF5">
<select name="gender" >
<option <? if ($dataary['gender']=="Mr.") echo "selected"; ?>
</option> <option value="Mr">Mr</option>
<option <? if ($dataary['gender']=="Mrs.") echo "selected"; ?>
</option> <option value="Mrs">Mrs.</option>
<option <? if ($dataary['gender']=="Ms.") echo "selected"; ?>
</option> <option value="Ms">Ms</option>
</select>
</td>
</div>
</tr>
<tr>
<td width="224" height="29" bgcolor="#DEECF5"> <div align="right"><font color="#FF0000">*</font>
<form class="form-inline">
<div class="row">
<div class="col-xs-3">
<b> <label for="lnm">Full Name :</label></b></div></td>
<td width="326" bgcolor="#DEECF5">
<div class="row">
<div class="col-sm-3">
<div class="form-group">
<input type="text" size="10" name="fnm" class="form-control" value="<?php print $dataary['fnm'];?>">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" size="10" name="lnm" class="form-control" value="<?php print $dataary['lnm'];?>">
</div>
</div>
</div>
<br>
<?php print $errors['fullname']; ?>
</td>
</div>
</div>
</form>
</tr>
我的标签(标题)与(先生,先生,女士)下拉列表重叠......我想在它们之间添加空格 那个 * 应该在 label(Title) 之前,但它在某个地方 应该是这样的 * Title: dropdown list
最佳答案
您的 HTML 标记有误:
<div class="container">
<table width=100%>
<tr>
<td>
<table width="100%" border="0" cellpadding="1" cellspacing="2" class="taborder">
<tr>
<td height=25 align="left" class="gtab">Your Contact Details</td>
</tr>
<tr align="left">
<td colspan="2" valign="top" class="content">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="link">
<tr>
<td width="224" height="29" bgcolor="#DEECF5">
<div align="right"><font color="#FF0000">*</font>
<form class="form-horizontal">
<div class="form-group">
<b>Title :</b>
</div>
</td>
根据这最后一条规则,您正在关闭“td”,但您还没有关闭最后一个“form”元素。我不知道这是否与您的问题有关,但建议您使用正确的 HTML 标记。
关于html - 我的标签与下拉列表重叠......我想在它们之间添加空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42948661/