I have created a web page that looks as follows:

I have used css display:table to create the overall layout. My intention is to have 3 columns, the left for message type filter, middle for date filters and right for the apply filters checkbox and refresh grid button. The gridview appears in a stand-alone div below the table divs
My problem is I have not been able to get the “right” applyFilters div to stay in-line at the right of the screen. The broswer insists on displaying under the dataFilters div. Note, this can’t be seen from the screen grab but there is lots of availabl space to the right of the dateFilters div.
Could anyone please let me know how I can correct this problem.
Aspx
<div id="layoutTable" style="display:table">
<div id="layoutRow1" style="display:table-row">
<div id="dataFilters">
<div id="table1Row1" style="display:table-row">
<span id="msgTypeFilter" class="filterProp">Message Type:
<asp:DropDownList ID="ddlMessageType" DataSourceID="dsmessageType" AutoPostBack="false"
DataValueField="messageType" runat="server" AppendDataBoundItems="true">
<asp:ListItem Text="All" Value="%"></asp:ListItem>
</asp:DropDownList>
</span>
</div>
<div id="table1Row2" style="display:table-row">
<%--additional filters here--%>
</div>
</div> <%--end data filters--%>
<div id="dateFilters">
<div id="table2Row1" style="display:table-row">
<span class="filterProp" id="startDate">Start Date:<asp:TextBox
ID="txtReceivedFilterStart" runat="server" Text="01/01/2013"
AutoPostBack="False" />
<ajaxToolkit:MaskedEditExtender ID="medReceivedStart" runat="server" MaskType="Date"
Mask="99/99/9999" MessageValidatorTip="true" TargetControlID="txtReceivedFilterStart"
AcceptAMPM="false" />
</span>
<span class="filterProp" id="endDate">End Date:<asp:TextBox
ID="txtReceivedFilterEnd" runat="server" Text="31/12/2050"
AutoPostBack="False" />
<ajaxToolkit:MaskedEditExtender ID="medReceivedEnd" runat="server" MaskType="Date"
Mask="99/99/9999" MessageValidatorTip="true" TargetControlID="txtReceivedFilterEnd" />
</span>
<span class="filterProp" id="whichDateFilter">Apply date filter to:
<asp:DropDownList runat="server" id="ddlDateFilterFieldname">
<asp:ListItem Value="ReceivedTime" Text="Received Time" />
<asp:ListItem Value="SentTime" Text="Sent Time" />
</asp:DropDownList>
</span>
</div>
<div id="table2Row2" style="display:table-row">
<span class="filterProp" id="startTime">
Start Time:<asp:TextBox ID="txtReceivedStartTime"
runat="server" Text="00:00:00" AutoPostBack="False" />
<ajaxToolkit:MaskedEditExtender ID="medReceivedStartTime" runat="server" MaskType="Time"
Mask="99:99:99" MessageValidatorTip="true" TargetControlID="txtReceivedStartTime"
AcceptAMPM="false" />
</span>
<span class="filterProp" id="endTime">
End Time:<asp:TextBox ID="txtReceivedEndTime" runat="server"
Text="23:59:59" AutoPostBack="False" />
<ajaxToolkit:MaskedEditExtender ID="medReceivedEndTime" runat="server" MaskType="Time"
Mask="99:99:99" MessageValidatorTip="true" TargetControlID="txtReceivedEndTime"
AcceptAMPM="false" />
</span>
<span class="filterProp" id="medValidators">
<ajaxToolkit:MaskedEditValidator ID="mvalReceivedStart" runat="server" ControlToValidate="txtReceivedFilterStart"
InvalidValueMessage="Incorrect format for date" ControlExtender="medReceivedStart"
TooltipMessage="Enter date in format dd/mm/yyyy" />
<ajaxToolkit:MaskedEditValidator ID="mvalReceivedEnd" runat="server" ControlToValidate="txtReceivedFilterEnd"
ControlExtender="medReceivedEnd" InvalidValueMessage="Incorrect format for date"
TooltipMessage="Enter datee in format dd/mm/yyyy" />
<ajaxToolkit:MaskedEditValidator ID="mvalReceivedStartTime" runat="server" ControlToValidate="txtReceivedStartTime"
InvalidValueMessage="Incorrect format for time" ControlExtender="medReceivedStartTime"
TooltipMessage="Enter time in format hh:mm:ss" />
<ajaxToolkit:MaskedEditValidator ID="mvalReceivedEndTime" runat="server" ControlToValidate="txtReceivedEndTime"
InvalidValueMessage="Incorrect format for time" ControlExtender="medReceivedEndTime"
TooltipMessage="Enter time in format hh:mm:ss" />
</span>
</div> <%--end table2Row2--%>
</div> <%--end dateFilters--%>
<div id="applyFilters">
<div id="tbl3row1" style="display:table-row">
<span class="filterProp" >
<asp:CheckBox ID="chkFilter" runat="server" Text="Apply Filters"
AutoPostBack="False" oncheckedchanged="chkFilter_CheckedChanged"/>
</span>
</div>
<div id="tbl3row2" style="display:table-row">
<span >
<asp:Button ID="btnRefresh" runat="server" Text="Refresh Grid"
onclick="btnRefresh_Click" class="button" />
</span>
</div>
</div>
</div> <%--end layout row 1--%>
</div> <%--end layout table--%>
CSS
.filterProp
{
/* float:left; */
display:table-cell;
}
#resultsGrid
{
padding: 20px 0px 20px 0px;
float: left;
}
#dateFilters > .filterProp
{
text-align: left;
}
#dateFilters
{
border: thin solid #C0C0C0;
display:table;
}
.filtersTitle
{
font-weight: bold;
margin-right: 20px;
}
#dataFilters
{
display:table;
float:left;
border: thin solid #C0C0C0;
}
#applyFilters
{
display:table;
}
.button
{
background-color: #00CC99;
color: #FFFFFF;
}
.button:hover
{
background-color: #33CCCC;
color: #FFFFFF;
}
.gridPager
{
text-align: right;
background-color: #C0C0C0;
color: #000000;
}
You could give the three columns a definitive width and float them (…or not. If you have enough space floating wouldn’t be necessary but taking them out of the flow and floating them next to each other would work). Your date filters expand so that the apply filters div wraps. Giving them a definitive width will align the date text boxes vertically, leaving more space at the end for the apply filters div. Experiment with the numbers (using percentage would be best, and the wrapper would be set at 100%). So for your Message type, make it 40%, your date type could be 20%, and your apply type would be 40%.
edit: I see you have the apply portion in a span. Maybe placing that in a div separate from the date div would allow more control in positioning (making it a block element as opposed to an inline element).