Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Controls / May 2008

Tip: Looking for answers? Try searching our database.

ASP Version 2 Beginner Question - Laying out Complex Forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roger Stenson - 30 Apr 2008 09:05 GMT
Hi
I am designing a fairly complex web form of which the following is two
lines using VB in VS 2005. (The appearance aspects are in the skin file)
When I display it in Design View both lines are beautifully alligned on the
identical width properties
When I display it in the browser,  the width properties  are ignored for the
labels (but not the text boxes)  and the first line compresses completely
out of alignment.

It makes no difference if I remove the table packing which comes in useful
further down the form when I  use both columns

I can pack the label fields out with spaces but can't believe that approach
will survive different browsers or screen sizes
What is the technique for achiev ing  robust field alignment in these
circumstances.

Roger Stenson

<table>
<tr style="width: 1000px; height:15px"><td colspan = "2" >
<asp:Label ID="lblEmail" runat="server" Text="Email" Width="220px" />
<asp:Label ID="lblPhone" runat="server" Text="Phone" Width="100px"/>
<asp:Label ID="lblMobile" runat="server" Text="Mobile" Width="110px"/>
<asp:Label ID="lblCommittee" runat="server" Text="Committee" Width="120px"/>
<asp:CheckBox ID="cbxDirects" runat="server" Text="Dir" Width="50px"/>
<asp:CheckBox ID="cbxSubs" runat="server" Text="Sub" Width="50px" />
<asp:CheckBox ID="cbxHst" runat="server" Text="Hst" Width="50px" />
<asp:Label ID="lblUpdated" runat="server" Text="Updated" Width="60px"/>
</td>
</tr>

<tr style="width: 1000px; height:15px"><td colspan = "2" >
<asp:TextBox ID="txtEmail" runat="server" Width="220px "/>
<asp:TextBox ID="txtPhone" runat="server" Width="100px"/>
<asp:TextBox ID="txtMobile" runat="server" Width="110px"/>
<asp:DropDownList ID="ddlCommittee" Width="120px" runat="server" >
<asp:ListItem Value="Chmn">Chairman</asp:ListItem>
</asp:DropDownList>
<asp:CheckBox ID="cbxSitter" runat="server" Text="Sit" Width="50px" />
<asp:CheckBox ID="cbxScores" runat="server" Text="Scr" Width="50px"/>
<asp:CheckBox ID="cbxCaters" runat="server" Text="Ctr" Width="50px"/>
<asp:TextBox ID="TextBox19" runat="server" Width="60px"/>
</td>
Stan - 04 May 2008 01:35 GMT
> Hi
> I am designing a fairly complex web form of which the following is two
[quoted text clipped - 40 lines]
> <asp:TextBox ID="TextBox19" runat="server" Width="60px"/>
> </td>

The 'width: 1000px;' style attributes in the row tags are in the wrong
place and will have no effect. They have to be in a cell tag. You need
to put them in a cell that doesn't span any more than a single column,
so the ones shown cannot be used for that purpose. Presumably
somewhere in your table there are single column cells.

BTW don't rely on the designer to preview how things will be laid out.
It invariably differs from the way the page appears in the browser.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.