Web Form display messed up on different computers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I build a web form with a 4-cell table on the top (flawlayout), followed by
some labels and textboxes (gridlayout). The web form is displayed well in
dell m60 laptop with all resolution options and DPI options. However when I
tried to run it in a dell P3 desktop, labels and textboxes overlapped each
other and they were in table area too.

Any suggestions? Do I have to put all controls in table cells?

Thank you. -Dale
 
Hi,

It does depend more of the browser/ display resolution than the processor.

Yes, try to put the controls inside tables , this will assure you it will
looks the same always (or will improve the chances anyway)



cheers,
 
Hi Ignacio,

Thank you for your reply. I am using IE, which only allows us to choose font
type. Where could I set IE's font size or display resolution?

-Dale
 
Hi,

You cannot' it does depend of the browser itself.

What you should do is use CSS , you set an style and it will look the same
in almost all computers/browsers. you can even save them in an separated
file so all the pages will look the same


cheers,
 
Hi Ignacio,

I tried CSS, but it controled heads, ... How could I add rules to avoid
overlaps? Here is my HTML code, where the table always got overlaped by other
controls in different versions of IE.

<HTML>
<HEAD>
<title>contactUs</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<TABLE style="Z-INDEX: 102; LEFT: 8px; WIDTH: 737px; POSITION: absolute;
TOP: 8px; HEIGHT: 183px"
cellSpacing="1" cellPadding="1" width="737" border="0">
<TBODY style="FONT-SIZE: smaller">
<TR>
<td style="WIDTH: 162px; HEIGHT: 106px"><IMG alt="" src="sd_logo.gif"
align="top">
</td>
<TD style="WIDTH: 562px; HEIGHT: 106px" align="center">
<P><FONT face="Verdana" color="blue" size="5"><STRONG>Web User
Control Login Sample</STRONG></FONT>
</P>
<P><STRONG><FONT color="#0000ff" size="4">Welcome!</FONT></STRONG>
</P>
</TD>
</TR>
<TR>
<TD style="WIDTH: 162px" vAlign="top">
<P><asp:hyperlink id="Hyperlink3" runat="server"
NavigateUrl="default.aspx">Back to Home</asp:hyperlink></P>
<P><asp:hyperlink id="HyperLink2" runat="server"
NavigateUrl="privatePage.aspx">Go to Protected Page</asp:hyperlink></P>
</TD>
<TD>
<P><asp:label id="lblMail" runat="server" ForeColor="#FF8080">From
and Subject are required fields. </asp:label></P>
</TD>
</TR>
</TBODY>
</TABLE>
<P><asp:textbox id="txtFrom" style="Z-INDEX: 101; LEFT: 88px; POSITION:
absolute; TOP: 264px" Runat="server"
Width="336px"></asp:textbox><asp:requiredfieldvalidator id="vldtxtFrom"
style="Z-INDEX: 109; LEFT: 440px; POSITION: absolute; TOP: 264px"
Runat="server" ControlToValidate="txtFrom" ErrorMessage="'From' is
required field!"></asp:requiredfieldvalidator><br>
<asp:textbox id="txtSubject" style="Z-INDEX: 103; LEFT: 88px; POSITION:
absolute; TOP: 296px"
Runat="server" Width="336px"></asp:textbox><asp:requiredfieldvalidator
id="vldtxtSubject" style="Z-INDEX: 110; LEFT: 440px; POSITION: absolute; TOP:
296px"
Runat="server" ControlToValidate="txtSubject" ErrorMessage="'Subject'
is required field!"></asp:requiredfieldvalidator></P>
<asp:textbox id="txtMessage" style="Z-INDEX: 104; LEFT: 16px; POSITION:
absolute; TOP: 328px"
Runat="server" Width="592px" TextMode="MultiLine"
Height="176px"></asp:textbox><br>
<asp:button id="butSend" style="Z-INDEX: 107; LEFT: 16px; POSITION:
absolute; TOP: 520px" Runat="server"
Text="Send"></asp:button><input id="butReset" style="Z-INDEX: 108; LEFT:
80px; POSITION: absolute; TOP: 520px" type="reset"
value="Cancel">
<br>
<asp:label id="lblFrom" style="Z-INDEX: 105; LEFT: 16px; POSITION:
absolute; TOP: 264px" runat="server">From</asp:label><asp:label
id="lblSubject" style="Z-INDEX: 106; LEFT: 16px; POSITION: absolute; TOP:
296px"
runat="server">Subject</asp:label><asp:label id="lblMailStatus"
style="Z-INDEX: 111; LEFT: 192px; POSITION: absolute; TOP: 520px"
runat="server"></asp:label><asp:regularexpressionvalidator id="revFrom"
style="Z-INDEX: 112; LEFT: 640px; POSITION: absolute; TOP: 264px"
runat="server"
ControlToValidate="txtFrom" ErrorMessage="Enter the email address as :
(e-mail address removed)"
ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
Display="Dynamic">Enter the email address as :
(e-mail address removed)</asp:regularexpressionvalidator></form>
</form>
<SCRIPT language="JScript" event="onload" for="window">
Form1.txtFrom.focus();
</SCRIPT>
</body>
</HTML>

Thank you. -Dale
 
Hi,
You cannot use absolute positioning, you cannot design the page by dragging
the controls in the design view and placing it where they appear to be
correct, use tables to format the page and place each control in a cell


cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


dale zhang said:
Hi Ignacio,

I tried CSS, but it controled heads, ... How could I add rules to avoid
overlaps? Here is my HTML code, where the table always got overlaped by
other
controls in different versions of IE.

<HTML>
<HEAD>
<title>contactUs</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<TABLE style="Z-INDEX: 102; LEFT: 8px; WIDTH: 737px; POSITION: absolute;
TOP: 8px; HEIGHT: 183px"
cellSpacing="1" cellPadding="1" width="737" border="0">
<TBODY style="FONT-SIZE: smaller">
<TR>
<td style="WIDTH: 162px; HEIGHT: 106px"><IMG alt="" src="sd_logo.gif"
align="top">
</td>
<TD style="WIDTH: 562px; HEIGHT: 106px" align="center">
<P><FONT face="Verdana" color="blue" size="5"><STRONG>Web User
Control Login Sample</STRONG></FONT>
</P>
<P><STRONG><FONT color="#0000ff" size="4">Welcome!</FONT></STRONG>
</P>
</TD>
</TR>
<TR>
<TD style="WIDTH: 162px" vAlign="top">
<P><asp:hyperlink id="Hyperlink3" runat="server"
NavigateUrl="default.aspx">Back to Home</asp:hyperlink></P>
<P><asp:hyperlink id="HyperLink2" runat="server"
NavigateUrl="privatePage.aspx">Go to Protected Page</asp:hyperlink></P>
</TD>
<TD>
<P><asp:label id="lblMail" runat="server" ForeColor="#FF8080">From
and Subject are required fields. </asp:label></P>
</TD>
</TR>
</TBODY>
</TABLE>
<P><asp:textbox id="txtFrom" style="Z-INDEX: 101; LEFT: 88px; POSITION:
absolute; TOP: 264px" Runat="server"
Width="336px"></asp:textbox><asp:requiredfieldvalidator id="vldtxtFrom"
style="Z-INDEX: 109; LEFT: 440px; POSITION: absolute; TOP: 264px"
Runat="server" ControlToValidate="txtFrom" ErrorMessage="'From' is
required field!"></asp:requiredfieldvalidator><br>
<asp:textbox id="txtSubject" style="Z-INDEX: 103; LEFT: 88px; POSITION:
absolute; TOP: 296px"
Runat="server" Width="336px"></asp:textbox><asp:requiredfieldvalidator
id="vldtxtSubject" style="Z-INDEX: 110; LEFT: 440px; POSITION: absolute;
TOP:
296px"
Runat="server" ControlToValidate="txtSubject" ErrorMessage="'Subject'
is required field!"></asp:requiredfieldvalidator></P>
<asp:textbox id="txtMessage" style="Z-INDEX: 104; LEFT: 16px; POSITION:
absolute; TOP: 328px"
Runat="server" Width="592px" TextMode="MultiLine"
Height="176px"></asp:textbox><br>
<asp:button id="butSend" style="Z-INDEX: 107; LEFT: 16px; POSITION:
absolute; TOP: 520px" Runat="server"
Text="Send"></asp:button><input id="butReset" style="Z-INDEX: 108; LEFT:
80px; POSITION: absolute; TOP: 520px" type="reset"
value="Cancel">
<br>
<asp:label id="lblFrom" style="Z-INDEX: 105; LEFT: 16px; POSITION:
absolute; TOP: 264px" runat="server">From</asp:label><asp:label
id="lblSubject" style="Z-INDEX: 106; LEFT: 16px; POSITION: absolute; TOP:
296px"
runat="server">Subject</asp:label><asp:label id="lblMailStatus"
style="Z-INDEX: 111; LEFT: 192px; POSITION: absolute; TOP: 520px"
runat="server"></asp:label><asp:regularexpressionvalidator id="revFrom"
style="Z-INDEX: 112; LEFT: 640px; POSITION: absolute; TOP: 264px"
runat="server"
ControlToValidate="txtFrom" ErrorMessage="Enter the email address as :
(e-mail address removed)"
ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
Display="Dynamic">Enter the email address as :
(e-mail address removed)</asp:regularexpressionvalidator></form>
</form>
<SCRIPT language="JScript" event="onload" for="window">
Form1.txtFrom.focus();
</SCRIPT>
</body>
</HTML>

Thank you. -Dale

Ignacio Machin ( .NET/ C# MVP ) said:
Hi,

You cannot' it does depend of the browser itself.

What you should do is use CSS , you set an style and it will look the
same
in almost all computers/browsers. you can even save them in an separated
file so all the pages will look the same


cheers,
 
Thank you very much. I did use table to put eneryone at the right places.

-Dale

Ignacio Machin ( .NET/ C# MVP ) said:
Hi,
You cannot use absolute positioning, you cannot design the page by dragging
the controls in the design view and placing it where they appear to be
correct, use tables to format the page and place each control in a cell


cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


dale zhang said:
Hi Ignacio,

I tried CSS, but it controled heads, ... How could I add rules to avoid
overlaps? Here is my HTML code, where the table always got overlaped by
other
controls in different versions of IE.

<HTML>
<HEAD>
<title>contactUs</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<TABLE style="Z-INDEX: 102; LEFT: 8px; WIDTH: 737px; POSITION: absolute;
TOP: 8px; HEIGHT: 183px"
cellSpacing="1" cellPadding="1" width="737" border="0">
<TBODY style="FONT-SIZE: smaller">
<TR>
<td style="WIDTH: 162px; HEIGHT: 106px"><IMG alt="" src="sd_logo.gif"
align="top">
</td>
<TD style="WIDTH: 562px; HEIGHT: 106px" align="center">
<P><FONT face="Verdana" color="blue" size="5"><STRONG>Web User
Control Login Sample</STRONG></FONT>
</P>
<P><STRONG><FONT color="#0000ff" size="4">Welcome!</FONT></STRONG>
</P>
</TD>
</TR>
<TR>
<TD style="WIDTH: 162px" vAlign="top">
<P><asp:hyperlink id="Hyperlink3" runat="server"
NavigateUrl="default.aspx">Back to Home</asp:hyperlink></P>
<P><asp:hyperlink id="HyperLink2" runat="server"
NavigateUrl="privatePage.aspx">Go to Protected Page</asp:hyperlink></P>
</TD>
<TD>
<P><asp:label id="lblMail" runat="server" ForeColor="#FF8080">From
and Subject are required fields. </asp:label></P>
</TD>
</TR>
</TBODY>
</TABLE>
<P><asp:textbox id="txtFrom" style="Z-INDEX: 101; LEFT: 88px; POSITION:
absolute; TOP: 264px" Runat="server"
Width="336px"></asp:textbox><asp:requiredfieldvalidator id="vldtxtFrom"
style="Z-INDEX: 109; LEFT: 440px; POSITION: absolute; TOP: 264px"
Runat="server" ControlToValidate="txtFrom" ErrorMessage="'From' is
required field!"></asp:requiredfieldvalidator><br>
<asp:textbox id="txtSubject" style="Z-INDEX: 103; LEFT: 88px; POSITION:
absolute; TOP: 296px"
Runat="server" Width="336px"></asp:textbox><asp:requiredfieldvalidator
id="vldtxtSubject" style="Z-INDEX: 110; LEFT: 440px; POSITION: absolute;
TOP:
296px"
Runat="server" ControlToValidate="txtSubject" ErrorMessage="'Subject'
is required field!"></asp:requiredfieldvalidator></P>
<asp:textbox id="txtMessage" style="Z-INDEX: 104; LEFT: 16px; POSITION:
absolute; TOP: 328px"
Runat="server" Width="592px" TextMode="MultiLine"
Height="176px"></asp:textbox><br>
<asp:button id="butSend" style="Z-INDEX: 107; LEFT: 16px; POSITION:
absolute; TOP: 520px" Runat="server"
Text="Send"></asp:button><input id="butReset" style="Z-INDEX: 108; LEFT:
80px; POSITION: absolute; TOP: 520px" type="reset"
value="Cancel">
<br>
<asp:label id="lblFrom" style="Z-INDEX: 105; LEFT: 16px; POSITION:
absolute; TOP: 264px" runat="server">From</asp:label><asp:label
id="lblSubject" style="Z-INDEX: 106; LEFT: 16px; POSITION: absolute; TOP:
296px"
runat="server">Subject</asp:label><asp:label id="lblMailStatus"
style="Z-INDEX: 111; LEFT: 192px; POSITION: absolute; TOP: 520px"
runat="server"></asp:label><asp:regularexpressionvalidator id="revFrom"
style="Z-INDEX: 112; LEFT: 640px; POSITION: absolute; TOP: 264px"
runat="server"
ControlToValidate="txtFrom" ErrorMessage="Enter the email address as :
(e-mail address removed)"
ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
Display="Dynamic">Enter the email address as :
(e-mail address removed)</asp:regularexpressionvalidator></form>
</form>
<SCRIPT language="JScript" event="onload" for="window">
Form1.txtFrom.focus();
</SCRIPT>
</body>
</HTML>

Thank you. -Dale

Ignacio Machin ( .NET/ C# MVP ) said:
Hi,

You cannot' it does depend of the browser itself.

What you should do is use CSS , you set an style and it will look the
same
in almost all computers/browsers. you can even save them in an separated
file so all the pages will look the same


cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


Hi Ignacio,

Thank you for your reply. I am using IE, which only allows us to choose
font
type. Where could I set IE's font size or display resolution?

-Dale

:

Hi,

It does depend more of the browser/ display resolution than the
processor.

Yes, try to put the controls inside tables , this will assure you it
will
looks the same always (or will improve the chances anyway)



cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


Hi,

I build a web form with a 4-cell table on the top (flawlayout),
followed
by
some labels and textboxes (gridlayout). The web form is displayed
well
in
dell m60 laptop with all resolution options and DPI options. However
when
I
tried to run it in a dell P3 desktop, labels and textboxes
overlapped
each
other and they were in table area too.

Any suggestions? Do I have to put all controls in table cells?

Thank you. -Dale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top