{ 宽度:212px; 显示:块; } .style10 { 宽度:192px; } ..readonlyfield { background-color:InfoText; margin-left:0px; } .style11 { 宽度:19px; } .style20 { padding-top:0px; padding-left:1px; padding-right:0px; vertical-align:middle; border-left:1px none#D5D291; border-right:1px none#D5D291; border-bottom:1px none#D5D291; font-size:10pt; 宽度:130px; border-top-style:没有; border-top-color:inherit; border-top-width:0px; } .field { background-color:White; } .style27 { 身高:26px; } .style29 { 宽度:90px; 身高:26px; } .style30 { 身高:26px; } .style23 { 宽度:90px; } .style25 { } .style24 { 宽度:1px; } .style33 { padding-top: 0px; padding-left:1px; padding-right:0px; vertical-align:middle; border-left:1px none#D5D291; border-right:1px none#D5D291; border-bottom:1px none#D5D291; font-size:10pt; border-top-style:none; border-top-color:inherit; border -top-width:0px; } .style34 { 宽度:25px; } .style35 { 宽度:59px; 身高:26px; } .style36 { 宽度:59px; } .style37 { 宽度:111px; 显示:块; } < /风格> < / head> < body> < form id =" form1" runat =" server"> < table id =" Id"类= QUOT; bodyTable" style =" width:63%"> < tr> < td class =" style37"> 选择姓名 < / td> < td colspan =" 5"> < asp:DropDownList ID = " ddSelect" runat =" server" AutoPostBack =" True" CssClass =" mainSelect"高度= QUOT; 20像素" Width =" 257px"> < / asp:DropDownList> < / td> < td align =" ;右边"> & nbsp;< / td> < td align =" right"类= QUOT; bodyCell" colspan =" 2"> Trans ID< / td> < td align =" left"类= QUOT; bodyCell" colspan =" 2"> < asp:TextBox ID =" txtTransactinID" runat =" server" BackColor =" WhiteSmoke" ReadOnly =" True" Width =" 44px">< / asp:TextBox> < / td> < / tr> < ; tr> < td class =" style37"> 姓氏< / td> < td class =" ; style10"> < asp:TextBox ID =" txtLastName" runat =" server" BackColor =" WhiteSmoke" CssClass =" readonlyfield" ReadOnly =" True" Width =" 192px">< / asp:TextBox> < / td> < td class =" style11"> MI< / td> < td class =" style34"> < asp:TextBox ID =" txtMiddleInit" runat =" server" BackColor =" WhiteSmoke" CssClass =" readonlyfield" ReadOnly =" True" Width =" 31px">< / asp:TextBox> < / td> < td class =" style20" colspan =" 2"> 名字< / td> < td colspan =" 5"> < ; asp:TextBox ID =" txtFirstName" runat =" server" BackColor =" WhiteSmoke" CssClass =" readonlyfield" ReadOnly =" True" Width =" 120px">< / asp:TextBox> < / td> < / tr> < tr> < td class =" style37"> 地址< / td> < td class =" firstlabel" colspan =" 4"> < asp:TextBox ID =" txtAddress1" runat =" server" CssClass =" field" Width =" 252px">< / asp:TextBox> < / td> < td class =" style35"> < / td> < td colspan =" 2" class =" style27"> < / td> < td colspan =" 2" class =" style29"> < / td> < td class =" style30" style =" width:268435456px"> < / td> < / tr> < tr> < td class =" style37"> 地址2< / td> < td class =" style14" colspan =" 4"> < asp:TextBox ID =" txtAddress2" runat =" server" Width =" 255px">< / asp:TextBox> < / td> < td class =" style36"> & nbsp;< / td> < td colspan =" 2" class =" style14"> & nbsp;< / td> < td colspan =" 2" class =" style23"> & nbsp;< / td> < td class =" style25" style =" width:268435456px"> & nbsp;< / td> < / tr> < tr> < td class =" style37"> City< / td> < td class =" style10" ;> < asp:TextBox ID =" txtCity" runat =" server" Width =" 197px">< / asp:TextBox> < / td> < td class =" style11"> St< / td> < td class =" style24" colspan =" 2"> < asp:DropDownList ID =" ddState" RUNAT = QUOT;服务器"高度=24px 宽度=" 56px"> < asp:ListItem值=" AL"> AL< / asp:ListItem> < asp:ListItem Value =" AR"> AR< / asp:ListItem> < asp:ListItem Value =" AZ"> AZ< ; / asp:ListItem> < asp:ListItem Value =" CA"> CA< / asp:ListItem> < asp:ListItem Value =" ; CO"> CO< / asp:ListItem> < asp:ListItem Value =" CT"> CT< / asp:ListItem> < asp:ListItem Value =" DC"> DC< / asp:ListItem> < asp:ListItem Value =" DE"> DE< / asp:ListItem> < asp:ListItem Value =" FL"> FL< / asp:ListItem> < asp:ListItem Value =" GA"> GA< / asp: ListItem> < asp:ListItem Value =" HI"> HI< / asp:ListItem> < asp:ListItem Value =" IA"> ; IA< / asp:ListItem> < asp:ListIte m值=" ID"> ID< / asp:ListItem> < asp:ListItem值=" IL"> IL< / asp:ListItem> < asp:ListItem Value =" IN"> IN< / asp:ListItem> < asp:ListItem Value =" KS"> KS< / asp:ListItem> < asp:ListItem Value =" KY"> KY< / asp:ListItem> < asp:ListItem Value =" LA"> LA< ; / asp:ListItem> < asp:ListItem Value =" MA"> MA< / asp:ListItem> < asp:ListItem Value =" ; MD"> MD< / asp:ListItem> < asp:ListItem Value =" ME"> ME< / asp:ListItem> < asp:ListItem Value =" MI"> MI< / asp:ListItem> < asp:ListItem Value =" MN"> MN< / asp:ListItem> < asp:ListItem Value =" MO"> MO< / asp:ListItem> < asp:ListItem Value =" MS"> MS< / asp: ListItem> < asp:ListItem Value =&quo t; MT"> MT< / asp:ListItem> < asp:ListItem Value =" NC"> NC< / asp:ListItem> < ; asp:ListItem Value =" ND"> ND< / asp:ListItem> < asp:ListItem Value =" NE"> NE< / asp:ListItem> < asp:ListItem Value =" NH"> NH< / asp:ListItem> < asp:ListItem Value =" NJ"> NJ< / asp :ListItem> < asp:ListItem Value =" NM"> NM< / asp:ListItem> < asp:ListItem Value =" NV" > NV< / asp:ListItem> < asp:ListItem Value =" NY"> NY< / asp:ListItem> < asp:ListItem值=" OH"> OH< / asp:ListItem> < asp:ListItem值=" OK"> OK< / asp:ListItem> < asp:ListItem Value =" OR"> OR< / asp:ListItem> < asp:ListItem Value =" PA"> PA< / asp:ListItem> < asp:ListItem Value =" PR"&g t; PR< / asp:ListItem> < asp:ListItem Value =" RI"> RI< / asp:ListItem> < asp:ListItem值=" SC" SC< / asp:ListItem> < asp:ListItem值=" SD"> SD< / asp:ListItem> < asp:ListItem Value =" TN"> TN< / asp:ListItem> < asp:ListItem Value =" TX"> TX< / asp:ListItem> < asp:ListItem Value =" UT"> UT< / asp:ListItem> < asp:ListItem Value =" VA"> VA< / asp:ListItem> < asp:ListItem Value =" VT"> VT< / asp:ListItem> < asp:ListItem Value =" WA"> WA< / asp:ListItem> < asp:ListItem Value =" WI"> WI< / asp:ListItem> < asp :ListItem Value =" WV"> WV< / asp:ListItem> < asp:ListItem Value =" WY"> WY< / asp:ListItem> < / asp:DropDownList> < / td> < td class =" style36"> 邮政编码< / td> < td class =" style14" colspan =" 5"> < asp:TextBox ID =" txtZip" runat =" server" Width =" 73px">< / asp:TextBox> < / td> < / tr> < tr> < td class =" style37"> 电话< / td> < td class =" style10"> < asp:TextBox ID =" txtPhone" runat =" server" Width =" 197px">< / asp:TextBox> < / td> < td class =" style11"> 电子邮件< / td> < td class =" style12" colspan =" 8"> < asp:textbox id =" txtEmail" runat =" server" Width =" 205px">< / asp:textbox>< / td> < / tr> < tr> < td class =" style37"> 毕业日期< / td> < td class =" style10"> < asp:textbox id =" txtGradDate" runat =" server" Width =" 73px">< / asp:textbox>< asp:imagebutton id =" imgGradDate" runat =" server" ImageUrl =" images / ShowCalendar.gif" CausesValidation =" False">< / asp:imagebutton>< / td> < td class =" style11"> & nbsp;< / td> < td class =" style34"> & nbsp;< / td> < td class =" style33"> & nbsp;< / td> < td class =" style36"> & nbsp;< / td> < td colspan =" 2" class =" style14"> & nbsp;< / td> < td colspan =" 2" class =" style23"> & nbsp;< / td> < td class =" style25" style =" width:268435456px"> & nbsp;< / td> < / tr> < tr> < td class =" style37"> Discipline< / td> < td class =" style14" ; colspan =" 4"> < asp:TextBox ID =" txtDiscipline" runat =" server" BackColor =" WhiteSmoke" CssClass =" readonlyfield" ReadOnly =" True" Width =" 256px">< / asp:TextBox> < / td> < td class =" style36"> 用户ID< / td> < td colspan =" 2" class =" style14"> & nbsp;< / td> < td colspan =" 2" class =" style23"> < asp:textbox id =" txtUserID" RUNAT = QUOT;服务器" Width =" 56px" ReadOnly =" True" BackColor =" WhiteSmoke">< / asp:textbox>< / td> < td class =" style25" style =" width:268435456px"> & nbsp;< / td> < / tr> < tr> < td class =" style37"> 学校< / td> < td class =" style14" ; colspan =" 4"> < asp:TextBox ID =" txtSchool" runat =" server" BackColor =" WhiteSmoke" CssClass =" readonlyfield" ReadOnly =" True" Width =" 256px">< / asp:TextBox> < / td> < td colspan =" 3"> 最后更新< / td> < td colspan =" 2" class =" style23"> < asp:textbox id =" txtLastUpdate" RUNAT = QUOT;服务器" Width =" 128px" Font-Size =" 8pt" ReadOnly =" True" BackColor =" WhiteSmoke">< / asp:textbox>< / td> < td class =" style25" ; style =" width:268435456px"> & nbsp;< / td> < / tr> < / table> < div> < / div> < / form> < / body> < / html>I have the following web page and I am trying to have the Field lables NOTto wrap. It looks fine in a designer but when I run the program in abrowser the lables that have a space wrap. How do I prevent this? Also, isthere a better way to design an data entry web page without using tables,(it''s a realy paint in you know what to do that with tables), but I don''tknow how to line up the fields any other way.Thank YouPeter<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs"Inherits="Default4" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"><title>Test</title><style type="text/css">..bodyTable {padding: 14px;border-style:solid;border-width:thin;font-family: Verdana, Arial, Helvetica, sans-serif;font-size:10pt;}td {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10pt;color: #000000;}..mainSelect{font-family: Courier New,Verdana, Arial, Helvetica, sans-serif;font-size:10pt;background-color:#C0FFFF;border-style:solid;border-width:thin;border-color:Olive;font-style:normal;}..bodyCell {padding-top: 0px;padding-left: 1px;padding-right: 0px;vertical-align:middle;border-top: 0px;border-left: 1px solid #D5D291;border-right: 1px solid #D5D291;border-bottom: 1px solid #D5D291;border-style:none;font-size:10pt;}.firstlabel{width: 212px;display:block;}.style10{width: 192px;}..readonlyfield{background-color:InfoText;margin-left: 0px;}.style11{width: 19px;}.style20{padding-top: 0px;padding-left: 1px;padding-right: 0px;vertical-align: middle;border-left: 1px none #D5D291;border-right: 1px none #D5D291;border-bottom: 1px none #D5D291;font-size: 10pt;width: 130px;border-top-style: none;border-top-color: inherit;border-top-width: 0px;}.field{background-color:White;}.style27{height: 26px;}.style29{width: 90px;height: 26px;}.style30{height: 26px;}.style23{width: 90px;}.style25{}.style24{width: 1px;}.style33{padding-top: 0px;padding-left: 1px;padding-right: 0px;vertical-align: middle;border-left: 1px none #D5D291;border-right: 1px none #D5D291;border-bottom: 1px none #D5D291;font-size: 10pt;border-top-style: none;border-top-color: inherit;border-top-width: 0px;}.style34{width: 25px;}.style35{width: 59px;height: 26px;}.style36{width: 59px;}.style37{width: 111px;display: block;}</style></head><body><form id="form1" runat="server"><table id="Id" class="bodyTable" style="width: 63%"><tr><td class="style37">Select Name</td><td colspan="5"><asp:DropDownList ID="ddSelect" runat="server"AutoPostBack="True"CssClass="mainSelect" Height="20px" Width="257px"></asp:DropDownList></td><td align="right">&nbsp;</td><td align="right" class="bodyCell" colspan="2">Trans ID</td><td align="left" class="bodyCell" colspan="2"><asp:TextBox ID="txtTransactinID" runat="server"BackColor="WhiteSmoke"ReadOnly="True" Width="44px"></asp:TextBox></td></tr><tr><td class="style37">Last Name</td><td class="style10"><asp:TextBox ID="txtLastName" runat="server"BackColor="WhiteSmoke"CssClass="readonlyfield" ReadOnly="True"Width="192px"></asp:TextBox></td><td class="style11">MI</td><td class="style34"><asp:TextBox ID="txtMiddleInit" runat="server"BackColor="WhiteSmoke"CssClass="readonlyfield" ReadOnly="True"Width="31px"></asp:TextBox></td><td class="style20" colspan="2">First Name</td><td colspan="5"><asp:TextBox ID="txtFirstName" runat="server"BackColor="WhiteSmoke"CssClass="readonlyfield" ReadOnly="True"Width="120px"></asp:TextBox></td></tr><tr><td class="style37">Address</td><td class="firstlabel" colspan="4"><asp:TextBox ID="txtAddress1" runat="server"CssClass="field" Width="252px"></asp:TextBox></td><td class="style35"></td><td colspan="2" class="style27"></td><td colspan="2" class="style29"></td><td class="style30" style="width: 268435456px"></td></tr><tr><td class="style37">Address 2</td><td class="style14" colspan="4"><asp:TextBox ID="txtAddress2" runat="server"Width="255px"></asp:TextBox></td><td class="style36">&nbsp;</td><td colspan="2" class="style14">&nbsp;</td><td colspan="2" class="style23">&nbsp;</td><td class="style25" style="width: 268435456px">&nbsp;</td></tr><tr><td class="style37">City</td><td class="style10"><asp:TextBox ID="txtCity" runat="server"Width="197px"></asp:TextBox></td><td class="style11">St</td><td class="style24" colspan="2"><asp:DropDownList ID="ddState" runat="server" Height="24px"Width="56px"><asp:ListItem Value="AL">AL</asp:ListItem><asp:ListItem Value="AR">AR</asp:ListItem><asp:ListItem Value="AZ">AZ</asp:ListItem><asp:ListItem Value="CA">CA</asp:ListItem><asp:ListItem Value="CO">CO</asp:ListItem><asp:ListItem Value="CT">CT</asp:ListItem><asp:ListItem Value="DC">DC</asp:ListItem><asp:ListItem Value="DE">DE</asp:ListItem><asp:ListItem Value="FL">FL</asp:ListItem><asp:ListItem Value="GA">GA</asp:ListItem><asp:ListItem Value="HI">HI</asp:ListItem><asp:ListItem Value="IA">IA</asp:ListItem><asp:ListItem Value="ID">ID</asp:ListItem><asp:ListItem Value="IL">IL</asp:ListItem><asp:ListItem Value="IN">IN</asp:ListItem><asp:ListItem Value="KS">KS</asp:ListItem><asp:ListItem Value="KY">KY</asp:ListItem><asp:ListItem Value="LA">LA</asp:ListItem><asp:ListItem Value="MA">MA</asp:ListItem><asp:ListItem Value="MD">MD</asp:ListItem><asp:ListItem Value="ME">ME</asp:ListItem><asp:ListItem Value="MI">MI</asp:ListItem><asp:ListItem Value="MN">MN</asp:ListItem><asp:ListItem Value="MO">MO</asp:ListItem><asp:ListItem Value="MS">MS</asp:ListItem><asp:ListItem Value="MT">MT</asp:ListItem><asp:ListItem Value="NC">NC</asp:ListItem><asp:ListItem Value="ND">ND</asp:ListItem><asp:ListItem Value="NE">NE</asp:ListItem><asp:ListItem Value="NH">NH</asp:ListItem><asp:ListItem Value="NJ">NJ</asp:ListItem><asp:ListItem Value="NM">NM</asp:ListItem><asp:ListItem Value="NV">NV</asp:ListItem><asp:ListItem Value="NY">NY</asp:ListItem><asp:ListItem Value="OH">OH</asp:ListItem><asp:ListItem Value="OK">OK</asp:ListItem><asp:ListItem Value="OR">OR</asp:ListItem><asp:ListItem Value="PA">PA</asp:ListItem><asp:ListItem Value="PR">PR</asp:ListItem><asp:ListItem Value="RI">RI</asp:ListItem><asp:ListItem Value="SC">SC</asp:ListItem><asp:ListItem Value="SD">SD</asp:ListItem><asp:ListItem Value="TN">TN</asp:ListItem><asp:ListItem Value="TX">TX</asp:ListItem><asp:ListItem Value="UT">UT</asp:ListItem><asp:ListItem Value="VA">VA</asp:ListItem><asp:ListItem Value="VT">VT</asp:ListItem><asp:ListItem Value="WA">WA</asp:ListItem><asp:ListItem Value="WI">WI</asp:ListItem><asp:ListItem Value="WV">WV</asp:ListItem><asp:ListItem Value="WY">WY</asp:ListItem></asp:DropDownList></td><td class="style36">Zip Code</td><td class="style14" colspan="5"><asp:TextBox ID="txtZip" runat="server"Width="73px"></asp:TextBox></td></tr><tr><td class="style37">Phone</td><td class="style10"><asp:TextBox ID="txtPhone" runat="server"Width="197px"></asp:TextBox></td><td class="style11">Email</td><td class="style12" colspan="8"><asp:textbox id="txtEmail" runat="server"Width="205px"></asp:textbox></td></tr><tr><td class="style37">Graduation Date</td><td class="style10"><asp:textbox id="txtGradDate" runat="server"Width="73px"></asp:textbox><asp:imagebutton id="imgGradDate" runat="server"ImageUrl="images/ShowCalendar.gif"CausesValidation="False"></asp:imagebutton></td><td class="style11">&nbsp;</td><td class="style34">&nbsp;</td><td class="style33">&nbsp;</td><td class="style36">&nbsp;</td><td colspan="2" class="style14">&nbsp;</td><td colspan="2" class="style23">&nbsp;</td><td class="style25" style="width: 268435456px">&nbsp;</td></tr><tr><td class="style37">Discipline</td><td class="style14" colspan="4"><asp:TextBox ID="txtDiscipline" runat="server"BackColor="WhiteSmoke"CssClass="readonlyfield" ReadOnly="True"Width="256px"></asp:TextBox></td><td class="style36">User ID</td><td colspan="2" class="style14">&nbsp;</td><td colspan="2" class="style23"><asp:textbox id="txtUserID" runat="server" Width="56px"ReadOnly="True" BackColor="WhiteSmoke"></asp:textbox></td><td class="style25" style="width: 268435456px">&nbsp;</td></tr><tr><td class="style37">School</td><td class="style14" colspan="4"><asp:TextBox ID="txtSchool" runat="server"BackColor="WhiteSmoke"CssClass="readonlyfield" ReadOnly="True"Width="256px"></asp:TextBox></td><td colspan="3">Last Update</td><td colspan="2" class="style23"><asp:textbox id="txtLastUpdate" runat="server" Width="128px"Font-Size="8pt" ReadOnly="True"BackColor="WhiteSmoke"></asp:textbox></td><td class="style25" style="width: 268435456px">&nbsp;</td></tr></table><div></div></form></body></html>推荐答案尝试style =" white:space :nowrap;" - Nathan Sokalski nj ******** @ hotmail.com http ://www.nathansokalski.com/ " Peter" < cz **** @ nospam.nospamwrote in message news:Ox ************** @ TK2MSFTNGP06.phx.gbl ...Try style="white:space:nowrap;"--Nathan Sokalski nj********@hotmail.com http://www.nathansokalski.com/"Peter" <cz****@nospam.nospamwrote in messagenews:Ox**************@TK2MSFTNGP06.phx.gbl... >我有以下网页,我试图将字段标记为来换行。它在设计师看起来很好但是当我在浏览器中运行程序时,带有空格包装的标签。我该如何防止这种情况?另外,是否有更好的方法来设计数据输入网页而不使用表,(它是真的在你知道用表做什么),但我不知道如何以其他方式排列领域。 谢谢 彼得 <%@ Page Language =" C#" AutoEventWireup = QUOT;真" CodeFile =" Default4.aspx.cs" Inherits =" Default4" %> <!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN" " http:/ /www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns =" http://www.w3.org/ 1999 / xhtml"> < head id =" Head1" runat =" server"> < title>测试< / title> < style type =" text / css"> .bodyTable { 填充:14px; border-style:solid; border-width:thin ; font-family:Verdana,Arial,Helvetica,sans-serif; font-size:10pt; } td { font-family:Verdana,Arial,Helvetica,sans-serif; 字体大小:10pt; 颜色:#000000; } .mainSelect { 字体-family:Courier New,Verdana,Arial,Helvetica,sans-serif; font-size:10pt; background-color:#C0FFFF; border-style:solid; border-width:thin; border-color:Olive; font-style:normal ; } .bodyCell { padding-top:0px; padding-left :1px; padding-right:0px; vertic al-align:middle; border-top:0px; border-left:1px solid#D5D291; border-right:1px实心#D5D291; border-bottom:1px solid#D5D291; border-style:none; font-size:10pt; } .firstlabel { 宽度:212px; 显示:块; } .style10 { 宽度:192px; } .readonlyfield { background-color:InfoText; margin -left:0px; } .style11 { 宽度:19px; } .style20 { padding-top:0px; padding -left:1px; padding-right:0px; vertical-align:middle; border-left:1px none#D5D291; border-right:1px none#D5D291; border-bottom:1px none#D5D291; font-size:10pt; 宽度:130px; border-top-style:none; border-top-color:inherit; border-top-width:0px; } .field { background-color:White; } .style27 { 身高:26px; } .style29 { 宽度:90px; 身高:26px; } .style30 { 身高:26px; } .style23 { 宽度:90px; } .style25 { } .style24 { 宽度:1px; } .style33 { padding-top:0px; padding-left:1px; padding-right:0px; 垂直-align:middle; border-left:1px none#D5D291; border-right:1px none#D5D291; border-bottom :1px无#D5D291; 字体大小:10pt; border-top-style:none; border-top-color:继承; border-top-width:0px; } .style34 { 宽度:25px; } .style35 { 宽度:59px; 身高:26px; } .style36 { 宽度:59px; } .style37 { 宽度:111px; 显示:块; } < / style> < / head> < body> < form id =" ; form1中" runat =" server"> < table id =" Id"类= QUOT; bodyTable" style =" width:63%"> < tr> < td class =" style37"> 选择姓名 < / td> < td colspan =" 5"> < asp:DropDownList ID = " ddSelect" runat =" server" AutoPostBack =" True" CssClass =" mainSelect"高度= QUOT; 20像素" Width =" 257px"> < / asp:DropDownList> < / td> < td align =" ;右边"> & nbsp;< / td> < td align =" right"类= QUOT; bodyCell" colspan =" 2"> Trans ID< / td> < td align =" left"类= QUOT; bodyCell" colspan =" 2"> < asp:TextBox ID =" txtTransactinID" runat =" server" BackColor =" WhiteSmoke" ReadOnly =" True" Width =" 44px">< / asp:TextBox> < / td> < / tr> < ; tr> < td class =" style37"> 姓氏< / td> < td class =" ; style10"> < asp:TextBox ID =" txtLastName" runat =" server" BackColor =" WhiteSmoke" CssClass =" readonlyfield" ReadOnly =" True" Width =" 192px">< / asp:TextBox> < / td> < td class =" style11"> MI< / td> < td class =" style34"> < asp:TextBox ID =" txtMiddleInit" runat =" server" BackColor =" WhiteSmoke" CssClass =" readonlyfield" ReadOnly =" True" Width =" 31px">< / asp:TextBox> < / td> < td class =" style20" colspan =" 2"> 名字< / td> < td colspan =" 5"> < ; asp:TextBox ID =" txtFirstName" runat =" server" BackColor =" WhiteSmoke" CssClass =" readonlyfield" ReadOnly =" True" Width =" 120px">< / asp:TextBox> < / td> < / tr> < tr> < td class =" style37"> 地址< / td> < td class =" firstlabel" colspan =" 4"> < asp:TextBox ID =" txtAddress1" runat =" server" CssClass =" field" Width =" 252px">< / asp:TextBox> < / td> < td class =" style35"> < / td> < td colspan =" 2" class =" style27"> < / td> < td colspan =" 2" class =" style29"> < / td> < td class =" style30" style =" width:268435456px"> < / td> < / tr> < tr> < td class =" style37"> 地址2< / td> < td class =" style14" colspan =" 4"> < asp:TextBox ID =" txtAddress2" runat =" server" Width =" 255px">< / asp:TextBox> < / td> < td class =" style36"> & nbsp;< / td> < td colspan =" 2" class =" style14"> & nbsp;< / td> < td colspan =" 2" class =" style23"> & nbsp;< / td> < td class =" style25" style =" width:268435456px"> & nbsp;< / td> < / tr> < tr> < td class =" style37"> City< / td> < td class =" style10" ;> < asp:TextBox ID =" txtCity" runat =" server" Width =" 197px">< / asp:TextBox> < / td> < td class =" style11"> St< / td> < td class =" style24" colspan =" 2"> < asp:DropDownList ID =" ddState" RUNAT = QUOT;服务器"高度=24px 宽度=" 56px"> < asp:ListItem值=" AL"> AL< / asp:ListItem> < asp:ListItem Value =" AR"> AR< / asp:ListItem> < asp:ListItem Value =" AZ"> AZ< ; / asp:ListItem> < asp:ListItem Value =" CA"> CA< / asp:ListItem> < asp:ListItem Value =" ; CO"> CO< / asp:ListItem> < asp:ListItem Value =" CT"> CT< / asp:ListItem> < asp:ListItem Value =" DC"> DC< / asp:ListItem> < asp:ListItem Value =" DE"> DE< / asp:ListItem> < asp:ListItem Value =" FL"> FL< / asp:ListItem> < asp:ListItem Value =" GA"> GA< / asp:大号istItem> < asp:ListItem Value =" HI"> HI< / asp:ListItem> < asp:ListItem Value =" IA"> ; IA< / asp:ListItem> < asp:ListItem Value =" ID"> ID< / asp:ListItem> < asp:ListItem Value =< IL"> IL< / asp:ListItem> < asp:ListItem Value =" IN"> IN< / asp:ListItem> < asp:ListItem Value =" KS"> KS< / asp:ListItem> < asp:ListItem Value =" KY"> KY< / asp:ListItem> < asp:ListItem Value =" LA"> LA< / asp:ListItem> < asp:ListItem Value =" MA"> MA< / asp:ListItem> < asp:ListItem Value =" MD"> MD< / asp:ListItem> < asp: ListItem Value =" ME"> ME< / asp:ListItem> < asp:ListItem Value =" MI"> MI< / asp:ListItem> < asp:ListItem Value =" MN"> MN< / asp:ListItem> < asp:ListItem Value =" MO"> MO< / asp:ListItem> < asp:ListItem Value =" MS"> MS< / asp:ListItem> < asp:ListItem Value =" MT"> MT< ; / asp:ListItem> < asp:ListItem Value =" NC"> NC< / asp:ListItem> < asp:ListItem Value =" ;ND">ND</asp:ListItem> <asp:ListItem Value="NE">NE</asp:ListItem> < asp:ListItem Value="NH">NH</asp:ListItem> <asp:ListItem Value="NJ">NJ</asp:ListIt em> <asp:ListItem Value="NM">NM</asp:ListItem> <asp:ListItem Value="NV">NV</asp:ListItem> <asp:ListItem Value="NY">NY</asp:ListItem> <asp:ListItem Value="OH">OH</asp:ListItem> <asp:ListItem Value="OK">OK</asp:ListItem> <asp:ListItem Value="OR">OR</asp:ListItem> <asp:ListItem Value="PA">PA</asp:ListItem> <asp:ListItem Value="PR">PR</asp:ListItem> <asp:ListItem Value="RI">RI</asp:ListItem> <asp:ListItem Value="SC">SC</asp:ListItem> <asp:ListI tem Value="SD">SD</asp:ListItem> <asp:ListItem Value="TN">TN</asp:ListItem> <asp:ListItem Value="TX">TX</asp:ListItem> <asp:ListItem Value="UT">UT</asp:ListItem> <asp:ListItem Value="VA">VA</asp:ListItem> <asp:ListItem Value="VT">VT</asp:ListItem> <asp:ListItem Value="WA">WA</asp:ListItem> <asp:ListItem Value="WI">WI</asp:ListItem> <asp:ListItem Value="WV">WV</asp:ListItem> <asp:ListItem Value="WY">WY</asp:ListItem> </asp:DropDownList> </td> $ b$b <td class="style36"> Zip Code</td> <td class="style14" colspan="5"> <asp:TextBox ID="txtZip" runat="server" Width="73px"></asp:TextBox> </td> </tr> <tr> <td class="style37"> Phone</td> <td class="style10"> <asp:TextBox ID="txtPhone" runat="server" Width="197px"></asp:TextBox> </td> <td class="style11"> Email</td> <td class="style12" colspan="8"> <asp:textbox id="txtEmail" runat="server" Width="205px"></asp:textbox></td> </tr> <tr> <td class="style37"> Graduation Date</td> <td class="style10"> <asp:textbox id="txtGradDate" runat="server" Width="73px"></asp:textbox><asp:imagebutton id="imgGradDate" runat="server" ImageUrl="images/ShowCalendar.gif" CausesValidation="False"></asp:imagebutton></td> <td class="style11"> &nbsp;</td> <td class="style34"> &nbsp;</td> <td class="style33"> &nbsp;</td> <td class="style36"> &nbsp;</td> <td colspan="2" class="style14"> &nbsp;</td> <td colspan="2" class="style23"> &nbsp;</td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> <tr> <td class="style37"> Discipline</td> <td class="style14" colspan="4"> <asp:TextBox ID="txtDiscipline" runat="server" BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True" Width="256px"></asp:TextBox> </td> <td class="style36"> User ID</td> <td colspan="2" class="style14"> &nbsp;</td> <td colspan="2" class="style23"> <asp:textbox id="txtUserID" RUNAT = QUOT;服务器" Width="56px" ReadOnly="True" BackColor="WhiteSmoke"></asp:textbox></td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> <tr> <td class="style37"> School</td> <td class="style14" colspan="4"> <asp:TextBox ID="txtSchool" runat="server" BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True" Width="256px"></asp:TextBox> </td> <td colspan="3"> Last Update</td> <td colspan="2" class="style23"> <asp:textbox id="txtLastUpdate" runat="server" Width="128px" Font-Size="8pt" ReadOnly="True" BackColor="WhiteSmoke"></asp:textbox></td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> </table> <div> </div> </form> </body> </html>>I have the following web page and I am trying to have the Field lables NOTto wrap. It looks fine in a designer but when I run the program in abrowser the lables that have a space wrap. How do I prevent this? Also,is there a better way to design an data entry web page without usingtables, (it''s a realy paint in you know what to do that with tables), but Idon''t know how to line up the fields any other way.Thank YouPeter<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs"Inherits="Default4" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title>Test</title> <style type="text/css">.bodyTable { padding: 14px; border-style:solid; border-width:thin; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:10pt;} td {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10pt;color: #000000;}.mainSelect{font-family: Courier New,Verdana, Arial, Helvetica, sans-serif;font-size:10pt;background-color:#C0FFFF; border-style:solid; border-width:thin; border-color:Olive; font-style:normal;}.bodyCell { padding-top: 0px; padding-left: 1px; padding-right: 0px; vertical-align:middle;border-top: 0px;border-left: 1px solid #D5D291;border-right: 1px solid #D5D291;border-bottom: 1px solid #D5D291;border-style:none;font-size:10pt;} .firstlabel { width: 212px; display:block; } .style10 { width: 192px; }.readonlyfield{background-color:InfoText;margin-left: 0px;} .style11 { width: 19px; } .style20 { padding-top: 0px; padding-left: 1px; padding-right: 0px; vertical-align: middle; border-left: 1px none #D5D291; border-right: 1px none #D5D291; border-bottom: 1px none #D5D291; font-size: 10pt; width: 130px; border-top-style: none; border-top-color: inherit; border-top-width: 0px; } .field{background-color:White;} .style27 { height: 26px; } .style29 { width: 90px; height: 26px; } .style30 { height: 26px; } .style23 { width: 90px; } .style25 { } .style24 { width: 1px; } .style33 { padding-top: 0px; padding-left: 1px; padding-right: 0px; vertical-align: middle; border-left: 1px none #D5D291; border-right: 1px none #D5D291; border-bottom: 1px none #D5D291; font-size: 10pt; border-top-style: none; border-top-color: inherit; border-top-width: 0px; } .style34 { width: 25px; } .style35 { width: 59px; height: 26px; } .style36 { width: 59px; } .style37 { width: 111px; display: block; } </style></head><body> <form id="form1" runat="server"><table id="Id" class="bodyTable" style="width: 63%"> <tr> <td class="style37"> Select Name </td> <td colspan="5"> <asp:DropDownList ID="ddSelect" runat="server"AutoPostBack="True" CssClass="mainSelect" Height="20px" Width="257px"> </asp:DropDownList> </td> <td align="right"> &nbsp;</td> <td align="right" class="bodyCell" colspan="2"> Trans ID</td> <td align="left" class="bodyCell" colspan="2"> <asp:TextBox ID="txtTransactinID" runat="server"BackColor="WhiteSmoke" ReadOnly="True" Width="44px"></asp:TextBox> </td> </tr> <tr> <td class="style37"> Last Name</td> <td class="style10"> <asp:TextBox ID="txtLastName" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="192px"></asp:TextBox> </td> <td class="style11"> MI</td> <td class="style34"> <asp:TextBox ID="txtMiddleInit" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="31px"></asp:TextBox> </td> <td class="style20" colspan="2"> First Name</td> <td colspan="5"> <asp:TextBox ID="txtFirstName" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="120px"></asp:TextBox> </td> </tr> <tr> <td class="style37"> Address</td> <td class="firstlabel" colspan="4"> <asp:TextBox ID="txtAddress1" runat="server"CssClass="field" Width="252px"></asp:TextBox> </td> <td class="style35"> </td> <td colspan="2" class="style27"> </td> <td colspan="2" class="style29"> </td> <td class="style30" style="width: 268435456px"> </td> </tr> <tr> <td class="style37"> Address 2</td> <td class="style14" colspan="4"> <asp:TextBox ID="txtAddress2" runat="server"Width="255px"></asp:TextBox> </td> <td class="style36"> &nbsp;</td> <td colspan="2" class="style14"> &nbsp;</td> <td colspan="2" class="style23"> &nbsp;</td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> <tr> <td class="style37"> City</td> <td class="style10"> <asp:TextBox ID="txtCity" runat="server"Width="197px"></asp:TextBox> </td> <td class="style11"> St</td> <td class="style24" colspan="2"> <asp:DropDownList ID="ddState" runat="server" Height="24px"Width="56px"> <asp:ListItem Value="AL">AL</asp:ListItem> <asp:ListItem Value="AR">AR</asp:ListItem> <asp:ListItem Value="AZ">AZ</asp:ListItem> <asp:ListItem Value="CA">CA</asp:ListItem> <asp:ListItem Value="CO">CO</asp:ListItem> <asp:ListItem Value="CT">CT</asp:ListItem> <asp:ListItem Value="DC">DC</asp:ListItem> <asp:ListItem Value="DE">DE</asp:ListItem> <asp:ListItem Value="FL">FL</asp:ListItem> <asp:ListItem Value="GA">GA</asp:ListItem> <asp:ListItem Value="HI">HI</asp:ListItem> <asp:ListItem Value="IA">IA</asp:ListItem> <asp:ListItem Value="ID">ID</asp:ListItem> <asp:ListItem Value="IL">IL</asp:ListItem> <asp:ListItem Value="IN">IN</asp:ListItem> <asp:ListItem Value="KS">KS</asp:ListItem> <asp:ListItem Value="KY">KY</asp:ListItem> <asp:ListItem Value="LA">LA</asp:ListItem> <asp:ListItem Value="MA">MA</asp:ListItem> <asp:ListItem Value="MD">MD</asp:ListItem> <asp:ListItem Value="ME">ME</asp:ListItem> <asp:ListItem Value="MI">MI</asp:ListItem> <asp:ListItem Value="MN">MN</asp:ListItem> <asp:ListItem Value="MO">MO</asp:ListItem> <asp:ListItem Value="MS">MS</asp:ListItem> <asp:ListItem Value="MT">MT</asp:ListItem> <asp:ListItem Value="NC">NC</asp:ListItem> <asp:ListItem Value="ND">ND</asp:ListItem> <asp:ListItem Value="NE">NE</asp:ListItem> <asp:ListItem Value="NH">NH</asp:ListItem> <asp:ListItem Value="NJ">NJ</asp:ListItem> <asp:ListItem Value="NM">NM</asp:ListItem> <asp:ListItem Value="NV">NV</asp:ListItem> <asp:ListItem Value="NY">NY</asp:ListItem> <asp:ListItem Value="OH">OH</asp:ListItem> <asp:ListItem Value="OK">OK</asp:ListItem> <asp:ListItem Value="OR">OR</asp:ListItem> <asp:ListItem Value="PA">PA</asp:ListItem> <asp:ListItem Value="PR">PR</asp:ListItem> <asp:ListItem Value="RI">RI</asp:ListItem> <asp:ListItem Value="SC">SC</asp:ListItem> <asp:ListItem Value="SD">SD</asp:ListItem> <asp:ListItem Value="TN">TN</asp:ListItem> <asp:ListItem Value="TX">TX</asp:ListItem> <asp:ListItem Value="UT">UT</asp:ListItem> <asp:ListItem Value="VA">VA</asp:ListItem> <asp:ListItem Value="VT">VT</asp:ListItem> <asp:ListItem Value="WA">WA</asp:ListItem> <asp:ListItem Value="WI">WI</asp:ListItem> <asp:ListItem Value="WV">WV</asp:ListItem> <asp:ListItem Value="WY">WY</asp:ListItem> </asp:DropDownList> </td> <td class="style36"> Zip Code</td> <td class="style14" colspan="5"> <asp:TextBox ID="txtZip" runat="server"Width="73px"></asp:TextBox> </td> </tr> <tr> <td class="style37"> Phone</td> <td class="style10"> <asp:TextBox ID="txtPhone" runat="server"Width="197px"></asp:TextBox> </td> <td class="style11"> Email</td> <td class="style12" colspan="8"> <asp:textbox id="txtEmail" runat="server"Width="205px"></asp:textbox></td> </tr> <tr> <td class="style37"> Graduation Date</td> <td class="style10"> <asp:textbox id="txtGradDate" runat="server"Width="73px"></asp:textbox><asp:imagebutton id="imgGradDate"runat="server" ImageUrl="images/ShowCalendar.gif"CausesValidation="False"></asp:imagebutton></td> <td class="style11"> &nbsp;</td> <td class="style34"> &nbsp;</td> <td class="style33"> &nbsp;</td> <td class="style36"> &nbsp;</td> <td colspan="2" class="style14"> &nbsp;</td> <td colspan="2" class="style23"> &nbsp;</td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> <tr> <td class="style37"> Discipline</td> <td class="style14" colspan="4"> <asp:TextBox ID="txtDiscipline" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="256px"></asp:TextBox> </td> <td class="style36"> User ID</td> <td colspan="2" class="style14"> &nbsp;</td> <td colspan="2" class="style23"> <asp:textbox id="txtUserID" runat="server" Width="56px"ReadOnly="True" BackColor="WhiteSmoke"></asp:textbox></td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> <tr> <td class="style37"> School</td> <td class="style14" colspan="4"> <asp:TextBox ID="txtSchool" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="256px"></asp:TextBox> </td> <td colspan="3"> Last Update</td> <td colspan="2" class="style23"> <asp:textbox id="txtLastUpdate" runat="server"Width="128px" Font-Size="8pt" ReadOnly="True" BackColor="WhiteSmoke"></asp:textbox></td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> </table> <div> </div> </form></body></html>"Nathan Sokalski" <nj********@hotmail.comwrote in message news:u0**************@TK2MSFTNGP05.phx.gbl... [top-posting corrected]"Nathan Sokalski" <nj********@hotmail.comwrote in messagenews:u0**************@TK2MSFTNGP05.phx.gbl...[top-posting corrected]\t \t\t\t\t>I am trying to have the Field lables NOT to wrap.>I am trying to have the Field lables NOT to wrap.\t \t\t\t\tTry style="white:space:nowrap;"Try style="white:space:nowrap;" 这是不正确的。 The correct syntax is: style="white-space:nowrap;" -- Mark Rae ASP.NET MVP http://www.markrae.netThat is incorrect. The correct syntax is: style="white-space:nowrap;"--Mark RaeASP.NET MVP http://www.markrae.net "Nathan Sokalski" <nj********@hotmail.comwrote in message news:u0**************@TK2MSFTNGP05.phx.gbl... \t"Nathan Sokalski" <nj********@hotmail.comwrote in messagenews:u0**************@TK2MSFTNGP05.phx.gbl...\t \t\t\t\tTry style="white:space:nowrap;" -- Nathan Sokalski nj********@hotmail.com http://www.nathansokalski.com/ "Peter" <cz****@nospam.nospamwrote in message news:Ox**************@TK2MSFTNGP06.phx.gbl... \tTry style="white:space:nowrap;"--Nathan Sokalski nj********@hotmail.com http://www.nathansokalski.com/"Peter" <cz****@nospam.nospamwrote in messagenews:Ox**************@TK2MSFTNGP06.phx.gbl...\t \t\t\t\t>>I have the following web page and I am trying to have the Field lables NOTto wrap. It looks fine in a designer but when I run the program in abrowser the lables that have a space wrap. How do I prevent this? Also,is there a better way to design an data entry web page without usingtables, (it’’s a realy paint in you know what to do that with tables), butI don’’t know how to line up the fields any other way.Thank You Peter <%@ Page Language="C#" AutoEventWireup = QUOT;真" CodeFile="Default4.aspx.cs"Inherits="Default4" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title>Test</title> <style type="text/css"> .bodyTable { padding: 14px; border-style:solid; border-width:thin; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:10pt;} td {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10pt;color: #000000;}.mainSelect{font-family: Courier New,Verdana, Arial, Helvetica, sans-serif;font-size:10pt;background-color:#C0FFFF; border-style:solid; border-width:thin; border-color:Olive; font-style:normal;}.bodyCell { padding-top: 0px; padding-left: 1px; padding-right: 0px; vertical-align:middle;border-top: 0px;border-left: 1px solid #D5D291;border-right: 1px solid #D5D291;border-bottom: 1px solid #D5D291;border-style:non e;font-size:10pt;} .firstlabel { width: 212px; display:block; } .style10 { width: 192px; }.readonlyfield{background-color:InfoText;margin-left: 0px;} .style11 { width: 19px; } .style20 { padding-top: 0px; padding-left: 1px; padding-right: 0px; vertical-align: middle; border-left: 1px none #D5D291; border-right: 1px none #D5D291; border-bottom: 1px none #D5D291; font-size: 10pt; width: 130px; border-top-style: none; border-top-color: inherit; border-top-width: 0px; } .field{background-color:White;} .style27 { height: 26px; } .style29 { width: 90px; height: 26px; } .style30 { height: 26px; } .style23 { width: 90px; } .style25 { } .style24 { width: 1px; } .style33 { padding-top: 0px; padding-left: 1px; padding-right: 0px; vertical-align: middle; border-left: 1px none #D5D291; border-right: 1px none #D5D291; border-bottom: 1px none #D5D291; font-size: 10pt; border-top-style: none; border-top-color: inherit; border-top-width: 0px; } .s tyle34 { width: 25px; } .style35 { width: 59px; height: 26px; } .style36 { width: 59px; } .style37 { width: 111px; display: block; } </style></head><body> <form id="form1" runat="server"> <table id="Id" class="bodyTable" style="width: 63%"> <tr> <td class="style37"> Select Name </td> <td colspan="5"> <asp:DropDownList ID="ddSelect" runat="server"AutoPostBack="True" CssClass="mainSelect" Height="20px" Width="257px"> </asp:DropDownList> </td> <td align="right"> &nbsp;</td> <td align="right" class="bodyCell" colspan="2"> Trans ID</td> <td align="left" class="bodyCell" colspan="2"> <asp:TextBox ID="txtTransactinID" runat="server"BackColor="WhiteSmoke" ReadOnly="True" Width="44px"></asp:TextBox> </td> </tr> <tr> <td class="style37"> Last Name</td> <td class="style10"> <asp:TextBox ID="txtLastName" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="192px"></asp:TextBox> </td> <td class="style11"> MI</td> <td class="style34"> <asp:TextBox ID="txtMiddleInit" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="31px"></asp:TextBox> </td> <td class="style20" colspan="2"> First Name</td> <td colspan="5"> <asp:TextBox ID="txtFirstName" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="120px"></asp:TextBox> </td> </tr> <tr> <td class="style37"> Address</td> <td class="firstlabel" colspan="4"> <asp:TextBox ID="txtAddress1" runat="server"CssClass="field" Width="252px"></asp:TextBox> </td> <td class="style35"> </td> <td colspan="2" class="style27"> </td> <td colspan="2" class="style29"> </td> <td class="style30" style="width: 268435456px"> </td> </tr> <tr> <td class="style37"> Address 2</td> <td class="style14" colspan="4"> <asp:TextBox ID="txtAddress2" runat="server"Width="255px"></asp:TextBox> </td> <td class="style36"> &nbsp;</td> <td colspan="2" class="style14"> &nbsp;</td> <td colspan="2" class="style23"> &nbsp;</td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> <tr> <td class="style37"> City</td> <td class="style10"> <asp:TextBox ID="txtCity" runat="server"Width="197px"></asp:TextBox> </td> <td class="style11"> St</td> <td class="style24" colspan="2"> <asp:DropDownList ID="ddState" runat="server"Height="24px" Width="56px"> <asp:ListItem Value="AL">AL</asp:ListItem> <asp:ListItem Value="AR">AR</asp:ListItem> <asp:ListItem Value="AZ">AZ</asp:ListItem> <asp:ListItem Value="CA">CA</asp:ListItem> <asp:ListItem Value="CO">CO</asp:ListItem> <asp:ListItem Value="CT">CT</asp:ListItem> <asp:ListItem Value="DC">DC</asp:ListItem> <asp:ListItem Value="DE">DE</asp:ListItem> <asp:ListItem Value="FL">FL</asp:ListItem> <asp:ListItem Value="GA">GA</asp:ListItem> <asp:ListItem Value="HI">HI</asp:ListIte m> <asp:ListItem Value="IA">IA</asp:ListItem> <asp:ListItem Value="ID">ID</asp:ListItem> <asp:ListItem Value="IL">IL</asp:ListItem> <asp:ListItem Value="IN">IN</asp:ListItem> <asp:ListItem Value="KS">KS</asp:ListItem> <asp:ListItem Value="KY">KY</asp:ListItem> <asp:ListItem Value="LA">LA</asp:ListItem> <asp:ListItem Value="MA">MA</asp:ListItem> <asp:ListItem Value="MD">MD</asp:ListItem> <asp:ListItem Value="ME">ME</asp:ListItem> <asp:ListItem Value="MI">MI</asp:ListItem> <asp:ListItem Value="MN">MN</asp:ListItem> <asp:ListItem Value="MO">MO</asp:ListItem> <asp:ListItem Value="MS">MS</asp:ListItem> <asp:ListItem Value="MT">MT</asp:ListItem> <asp:ListItem Value="NC">NC</asp:ListItem> <asp:ListItem Value="ND">ND</asp:ListItem> <asp:ListItem Value="NE">NE</asp:ListItem> <asp:ListItem Value="NH">NH</asp:ListItem> <asp:ListItem Value="NJ">NJ</asp:ListItem> <asp:ListItem Value="NM">NM</asp:ListItem> <asp:ListItem Value="NV">NV</asp:ListItem> <asp:List Item Value="NY">NY</asp:ListItem> <asp:ListItem Value="OH">OH</asp:ListItem> <asp:ListItem Value="OK">OK</asp:ListItem> <asp:ListItem Value="OR">OR</asp:ListItem> <asp:ListItem Value="PA">PA</asp:ListItem> <asp:ListItem Value="PR">PR</asp:ListItem> <asp:ListItem Value="RI">RI</asp:ListItem> <asp:ListItem Value="SC">SC</asp:ListItem> <asp:ListItem Value="SD">SD</asp:ListItem> <asp:ListItem Value="TN">TN</asp:ListItem> <asp:ListItem Value="TX">TX</asp:ListItem> <asp:ListItem Value="UT&q uot;>UT</asp:ListItem> <asp:ListItem Value="VA">VA</asp:ListItem> <asp:ListItem Value="VT">VT</asp:ListItem> <asp:ListItem Value="WA">WA</asp:ListItem> <asp:ListItem Value="WI">WI</asp:ListItem> <asp:ListItem Value="WV">WV</asp:ListItem> <asp:ListItem Value="WY">WY</asp:ListItem> </asp:DropDownList> </td> <td class="style36"> Zip Code</td> <td class="style14" colspan="5"> <asp:TextBox ID="txtZip" runat="server"Width="73px"></asp:TextBox> </td> </tr> <tr> <td class="style37"> Phone</td> <td class="style10"> <asp:TextBox ID="txtPhone" runat="server"Width="197px"></asp:TextBox> </td> <td class="style11"> Email</td> <td class="style12" colspan="8"> <asp:textbox id="txtEmail" runat="server"Width="205px"></asp:textbox></td> </tr> <tr> <td class="style37"> Graduation Date</td> <td class="style10"> <asp:textbox id="txtGradDate" runat="server"Width="73px"></asp:textbox><asp:imagebutton id="imgGradDate"runat="server" ImageUrl="images/ShowCalendar.gif"CausesValidation="False"></asp:imagebutton></td> <td class="style11"> &nbsp;</td> <td class="style34"> &nbsp;</td> <td class="style33"> &nbsp;</td> <td class="style36"> &nbsp;</td> <td colspan="2" class="style14"> &nbsp;</td> <td colspan="2" class="style23"> &nbsp;</td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> <tr> <td class="style37"> Discipline</td> <td class="style14" colspan="4"> <asp:TextBox ID="txtDiscipline" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="256px"></asp:TextBox> </td> <td class="style36"> User ID</td> <td colspan="2" class="style14"> &nbsp;</td> <td colspan="2" class="style23"> <asp:textbox id="txtUserID" RUNAT = QUOT;服务器" Width="56px"ReadOnly="True" BackColor="WhiteSmoke"></asp:textbox></td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> <tr> <td class="style37"> School</td> <td class="style14" colspan="4"> <asp:TextBox ID="txtSchool" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="256px"></asp:TextBox> </td> <td colspan="3"> Last Update</td> <td colspan="2" class="style23"> <asp:textbox id="txtLastUpdate" runat="server"Width="128px" Font-Size="8pt" ReadOnly="True" BackColor="WhiteSmoke"></asp:textbox></td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> </table> <div> </div> </form></body></html>>>I have the following web page and I am trying to have the Field lables NOTto wrap. It looks fine in a designer but when I run the program in abrowser the lables that have a space wrap. How do I prevent this? Also,is there a better way to design an data entry web page without usingtables, (it''s a realy paint in you know what to do that with tables), butI don''t know how to line up the fields any other way.Thank YouPeter<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs"Inherits="Default4" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head id="Head1" runat="server"> <title>Test</title> <style type="text/css">.bodyTable { padding: 14px; border-style:solid; border-width:thin; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:10pt;} td {font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10pt;color: #000000;}.mainSelect{font-family: Courier New,Verdana, Arial, Helvetica, sans-serif;font-size:10pt;background-color:#C0FFFF; border-style:solid; border-width:thin; border-color:Olive; font-style:normal;}.bodyCell { padding-top: 0px; padding-left: 1px; padding-right: 0px; vertical-align:middle;border-top: 0px;border-left: 1px solid #D5D291;border-right: 1px solid #D5D291;border-bottom: 1px solid #D5D291;border-style:none;font-size:10pt;} .firstlabel { width: 212px; display:block; } .style10 { width: 192px; }.readonlyfield{background-color:InfoText;margin-left: 0px;} .style11 { width: 19px; } .style20 { padding-top: 0px; padding-left: 1px; padding-right: 0px; vertical-align: middle; border-left: 1px none #D5D291; border-right: 1px none #D5D291; border-bottom: 1px none #D5D291; font-size: 10pt; width: 130px; border-top-style: none; border-top-color: inherit; border-top-width: 0px; } .field{background-color:White;} .style27 { height: 26px; } .style29 { width: 90px; height: 26px; } .style30 { height: 26px; } .style23 { width: 90px; } .style25 { } .style24 { width: 1px; } .style33 { padding-top: 0px; padding-left: 1px; padding-right: 0px; vertical-align: middle; border-left: 1px none #D5D291; border-right: 1px none #D5D291; border-bottom: 1px none #D5D291; font-size: 10pt; border-top-style: none; border-top-color: inherit; border-top-width: 0px; } .style34 { width: 25px; } .style35 { width: 59px; height: 26px; } .style36 { width: 59px; } .style37 { width: 111px; display: block; } </style></head><body> <form id="form1" runat="server"> <table id="Id" class="bodyTable" style="width: 63%"> <tr> <td class="style37"> Select Name </td> <td colspan="5"> <asp:DropDownList ID="ddSelect" runat="server"AutoPostBack="True" CssClass="mainSelect" Height="20px" Width="257px"> </asp:DropDownList> </td> <td align="right"> &nbsp;</td> <td align="right" class="bodyCell" colspan="2"> Trans ID</td> <td align="left" class="bodyCell" colspan="2"> <asp:TextBox ID="txtTransactinID" runat="server"BackColor="WhiteSmoke" ReadOnly="True" Width="44px"></asp:TextBox> </td> </tr> <tr> <td class="style37"> Last Name</td> <td class="style10"> <asp:TextBox ID="txtLastName" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="192px"></asp:TextBox> </td> <td class="style11"> MI</td> <td class="style34"> <asp:TextBox ID="txtMiddleInit" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="31px"></asp:TextBox> </td> <td class="style20" colspan="2"> First Name</td> <td colspan="5"> <asp:TextBox ID="txtFirstName" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="120px"></asp:TextBox> </td> </tr> <tr> <td class="style37"> Address</td> <td class="firstlabel" colspan="4"> <asp:TextBox ID="txtAddress1" runat="server"CssClass="field" Width="252px"></asp:TextBox> </td> <td class="style35"> </td> <td colspan="2" class="style27"> </td> <td colspan="2" class="style29"> </td> <td class="style30" style="width: 268435456px"> </td> </tr> <tr> <td class="style37"> Address 2</td> <td class="style14" colspan="4"> <asp:TextBox ID="txtAddress2" runat="server"Width="255px"></asp:TextBox> </td> <td class="style36"> &nbsp;</td> <td colspan="2" class="style14"> &nbsp;</td> <td colspan="2" class="style23"> &nbsp;</td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> <tr> <td class="style37"> City</td> <td class="style10"> <asp:TextBox ID="txtCity" runat="server"Width="197px"></asp:TextBox> </td> <td class="style11"> St</td> <td class="style24" colspan="2"> <asp:DropDownList ID="ddState" runat="server"Height="24px" Width="56px"> <asp:ListItem Value="AL">AL</asp:ListItem> <asp:ListItem Value="AR">AR</asp:ListItem> <asp:ListItem Value="AZ">AZ</asp:ListItem> <asp:ListItem Value="CA">CA</asp:ListItem> <asp:ListItem Value="CO">CO</asp:ListItem> <asp:ListItem Value="CT">CT</asp:ListItem> <asp:ListItem Value="DC">DC</asp:ListItem> <asp:ListItem Value="DE">DE</asp:ListItem> <asp:ListItem Value="FL">FL</asp:ListItem> <asp:ListItem Value="GA">GA</asp:ListItem> <asp:ListItem Value="HI">HI</asp:ListItem> <asp:ListItem Value="IA">IA</asp:ListItem> <asp:ListItem Value="ID">ID</asp:ListItem> <asp:ListItem Value="IL">IL</asp:ListItem> <asp:ListItem Value="IN">IN</asp:ListItem> <asp:ListItem Value="KS">KS</asp:ListItem> <asp:ListItem Value="KY">KY</asp:ListItem> <asp:ListItem Value="LA">LA</asp:ListItem> <asp:ListItem Value="MA">MA</asp:ListItem> <asp:ListItem Value="MD">MD</asp:ListItem> <asp:ListItem Value="ME">ME</asp:ListItem> <asp:ListItem Value="MI">MI</asp:ListItem> <asp:ListItem Value="MN">MN</asp:ListItem> <asp:ListItem Value="MO">MO</asp:ListItem> <asp:ListItem Value="MS">MS</asp:ListItem> <asp:ListItem Value="MT">MT</asp:ListItem> <asp:ListItem Value="NC">NC</asp:ListItem> <asp:ListItem Value="ND">ND</asp:ListItem> <asp:ListItem Value="NE">NE</asp:ListItem> <asp:ListItem Value="NH">NH</asp:ListItem> <asp:ListItem Value="NJ">NJ</asp:ListItem> <asp:ListItem Value="NM">NM</asp:ListItem> <asp:ListItem Value="NV">NV</asp:ListItem> <asp:ListItem Value="NY">NY</asp:ListItem> <asp:ListItem Value="OH">OH</asp:ListItem> <asp:ListItem Value="OK">OK</asp:ListItem> <asp:ListItem Value="OR">OR</asp:ListItem> <asp:ListItem Value="PA">PA</asp:ListItem> <asp:ListItem Value="PR">PR</asp:ListItem> <asp:ListItem Value="RI">RI</asp:ListItem> <asp:ListItem Value="SC">SC</asp:ListItem> <asp:ListItem Value="SD">SD</asp:ListItem> <asp:ListItem Value="TN">TN</asp:ListItem> <asp:ListItem Value="TX">TX</asp:ListItem> <asp:ListItem Value="UT">UT</asp:ListItem> <asp:ListItem Value="VA">VA</asp:ListItem> <asp:ListItem Value="VT">VT</asp:ListItem> <asp:ListItem Value="WA">WA</asp:ListItem> <asp:ListItem Value="WI">WI</asp:ListItem> <asp:ListItem Value="WV">WV</asp:ListItem> <asp:ListItem Value="WY">WY</asp:ListItem> </asp:DropDownList> </td> <td class="style36"> Zip Code</td> <td class="style14" colspan="5"> <asp:TextBox ID="txtZip" runat="server"Width="73px"></asp:TextBox> </td> </tr> <tr> <td class="style37"> Phone</td> <td class="style10"> <asp:TextBox ID="txtPhone" runat="server"Width="197px"></asp:TextBox> </td> <td class="style11"> Email</td> <td class="style12" colspan="8"> <asp:textbox id="txtEmail" runat="server"Width="205px"></asp:textbox></td> </tr> <tr> <td class="style37"> Graduation Date</td> <td class="style10"> <asp:textbox id="txtGradDate" runat="server"Width="73px"></asp:textbox><asp:imagebutton id="imgGradDate"runat="server" ImageUrl="images/ShowCalendar.gif"CausesValidation="False"></asp:imagebutton></td> <td class="style11"> &nbsp;</td> <td class="style34"> &nbsp;</td> <td class="style33"> &nbsp;</td> <td class="style36"> &nbsp;</td> <td colspan="2" class="style14"> &nbsp;</td> <td colspan="2" class="style23"> &nbsp;</td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> <tr> <td class="style37"> Discipline</td> <td class="style14" colspan="4"> <asp:TextBox ID="txtDiscipline" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="256px"></asp:TextBox> </td> <td class="style36"> User ID</td> <td colspan="2" class="style14"> &nbsp;</td> <td colspan="2" class="style23"> <asp:textbox id="txtUserID" runat="server" Width="56px"ReadOnly="True" BackColor="WhiteSmoke"></asp:textbox></td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> <tr> <td class="style37"> School</td> <td class="style14" colspan="4"> <asp:TextBox ID="txtSchool" runat="server"BackColor="WhiteSmoke" CssClass="readonlyfield" ReadOnly="True"Width="256px"></asp:TextBox> </td> <td colspan="3"> Last Update</td> <td colspan="2" class="style23"> <asp:textbox id="txtLastUpdate" runat="server"Width="128px" Font-Size="8pt" ReadOnly="True" BackColor="WhiteSmoke"></asp:textbox></td> <td class="style25" style="width: 268435456px"> &nbsp;</td> </tr> </table> <div> </div> </form></body></html> Thanks But it has no effect, still wrappingThanksBut it has no effect, still wrapping 这篇关于包含表格的数据封面网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-23 22:03