Reputation: 4905
I need to know what HTML container to use for ASP form in a way that it can be styled using CSS without using HTML insead of HTML table.
Fore example this form on aspx page:
<form id="WPF" runat="server">
<asp:Label ID="lblCCode" Text="Country Code" runat="server">
<asp:TextBox ID="txtCCode" runat="server" Width="85"></asp:TextBox>
</asp:Label>
<asp:Label ID="lblCName" Text="Country Name" runat="server">
<asp:TextBox ID="txtCName" runat="server" Width="150"></asp:TextBox>
</asp:Label>
<asp:Label ID="lblCPop" Text="Country Population" runat="server">
<asp:TextBox ID="txtCPop" runat="server" Width="130"></asp:TextBox>
</asp:Label>
Upvotes: 0
Views: 663
Reputation: 42182
The use of DIV's instead of TABLE is well known, lots of stuff to find.
eg http://www.html-cleaner.com/features/replace-html-table-tags-with-divs/
If it will be simpler I don't know but you got more options. But if your only goal is to only use CSS for the style of a TABLE, everything about a TABLE can be staled using CSS. See here
Upvotes: 1
Reputation: 218
I would recommend that you employ Bootstrap, if you are able. This is a solution created by the Twitter team and endorsed by Microsoft themselves in their latest templates. Futhermore, it is mobile/tablet friendly due to its responsive architecture.
Here is a link to some sample code on how to put some form elements on your page: http://getbootstrap.com/components/#input-groups
Craig
Upvotes: 1