Saturday, March 24, 2012

Text Size

I found an issue while working on my asp.net pages in VB. When you open the browser everything looks fine. If a user clicks view and text size and changes the size to larger all my pages are distorted. The text boxes are merged and you cant read them. Does anyone have a solution for this?How are you creating your web page? The pages should look different, but shoudl still be readable. Can you send a short aspx page that demonstrates the behaviour?

Thanks,

Russell
Sounds like you are using GridLayout as you pageLayout (but I could be wrong). I would suggest putting your information (labels and textboxes) in a table. If this dosen't work let me know and I will take a closer look.

Trey
yes I am using a grid layout
I tried to see if there was a difference with a html label or a web form label but they look the same. It seems when the text size is increased by the user it drops the second word in the textbox on another line. How do you know when to use a html label or a web form label?
here a sample

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>trash</title>
<meta content="Visual Basic 7.0" 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 id="Table1" style="Z-INDEX: 103; LEFT: 200px; WIDTH: 128px; POSITION: absolute; TOP: 32px; HEIGHT: 30px" cellSpacing="1" cellPadding="1" width="128" border="1">
<TR>
<TD><asp:label id="Label1" runat="server" Width="95px" Height="22px">web form label</asp:label></TD>
</TR>
</TABLE>
<DIV style="DISPLAY: inline; Z-INDEX: 102; LEFT: 338px; WIDTH: 69px; POSITION: absolute; TOP: 34px; HEIGHT: 25px" ms_positioning="FlowLayout">html
label</DIV>
</form>
</body>
</HTML>
For you table width i would use percents instead of px. I feel it is the best way if you are worried about font size increases. I would also use flowlayout for what you are trying to do. here is an example:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>trash</title>
<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="50%" align="center" border="1">
<TR>
<TD>
<asp:Label id="Label1" runat="server">Label</asp:Label></TD>
<TD>
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox></TD>
</TR>
</TABLE>
</form>
</body>
</HTML>

if you give me exactly what you are doing i can see if i can get it working for you.
It looks like that will do the trick thanks a lot.

0 comments:

Post a Comment