I would like to position one td
element on the left-hand side of the table and make it span multiple rows. To the right of that td
element I'd like to align multiple td
elements in each row the original td
element spans. However, since I suck at HTML/CSS, my most recent attempt looks like this.
What I'd like is for the Territory
label and input text box to sit below the Effective on this date
label/input. (Used my artistic/Paint talents to highlight the area I'd like the Territory stuff to go)
HTML/Razor
<table class="boxMe">
<tr>
<td id="zipBox">
@Html.Raw("Zip Code")
@Html.TextAreaFor(model => model.searchZip, new { style = "width: 300px;", placeholder = "Enter up to 35 comma separated zip codes" })
</td>
<td id="dateBox">
@Html.LabelFor(model => model.searchDate)
@Html.TextBoxFor(model => model.searchDate, new { style="width: 80px;"})
</td>
<td id="stateBox">
@Html.LabelFor(model => model.searchState)
@Html.DropDownListFor(model => model.searchState, Model.StateCodes, " ")
<button type="submit" id="SearchButton">Search</button>
</td>
</tr>
<tr>
<td id="terrSearch">
@Html.LabelFor(model => model.searchTerritory)
@Html.TextBoxFor(model => model.searchTerritory, new { style = "width: 30px;padding-left:10px;", maxLength = 3 })
</td>
</tr>
</table
CSS
#zipBox {
float: left;
padding-left: 20px;
padding-right: 10px;
padding-top: 20px;
padding-bottom: 20px;
vertical-align: top;
row-span: 2;
border:none;
}
#dateBox {
float: left;
padding-right: 10px;
padding-top: 20px;
border:none;
}
#stateBox {
float: left;
padding-right: 20px;
padding-top: 20px;
border:none;
}
#terrSearch {
border:none;
}
.boxMe
{
float: left;
border: 1px solid Silver;
padding: 3px;
}