Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm on my first ASP.Net development..

 

On my laptop, for example, i have a page with all 4 textboxes aligned and page looks good.

 

I just looked at it from another co-worker's machine, and the textboxes are not aligned..one was to the right, one to the left...

 

we both IE.

How can I make my pages look the same from machine to machine??

Posted
impossible question to answer without knowing more information (using CSS? using tables?) or seeing some code (HTML) that is driving your layout
If you make it idiot proof, they'll build a better idiot :-)
Posted

No CSS, This is for example one HTML code. It's not in a table, it's in a Panel. Would that make a differece?? would it be an issue with resolution??

 

This is the code:

<HTML>
<HEAD>
	<title>Incident</title>
	<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
	<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">
		<asp:radiobutton id="rbFindIncident" style="Z-INDEX: 101; LEFT: 411px; POSITION: absolute; TOP: 130px" runat="server" GroupName="IncidentRadioButtons" Checked="True" Text="Find Incident" AutoPostBack="True"></asp:radiobutton><asp:radiobutton id="rbAddIncident" style="Z-INDEX: 102; LEFT: 683px; POSITION: absolute; TOP: 130px" runat="server" GroupName="IncidentRadioButtons" Text="Add Incident" AutoPostBack="True"></asp:radiobutton><asp:panel id="pnlFindIncident" style="Z-INDEX: 103; LEFT: 234px; POSITION: absolute; TOP: 198px" runat="server" Height="368px" Width="784px" BorderStyle="Solid">
			<P>   </P>
			<P>                                        
				<asp:Label id="Label1" runat="server" Height="16px" Width="317px" Font-Bold="True" Font-Size="Medium">Please enter a search criteria:</asp:Label>    
			</P>
			<P> 
				<asp:Label id="lblFindSiteCode" runat="server" Font-Bold="True" Font-Size="Small">Site Code:</asp:Label>         
				<asp:TextBox id="txtSiteCode" runat="server" Width="162px"></asp:TextBox>    
				<asp:Label id="lblCCC" runat="server" Height="18px" Width="100px" Font-Bold="True">CCC:</asp:Label>
				<asp:TextBox id="txtCCC" runat="server" Width="162px"></asp:TextBox></P>
			<P> 
				<asp:Label id="lblFindSiteName" runat="server" Width="101px" Font-Bold="True"> Site Name:</asp:Label>   
				    
				<asp:TextBox id="txtFindSiteName" runat="server" Width="453px"></asp:TextBox></P>
			<P> 
				<asp:Label id="lblFindIncid" runat="server" Height="26px" Width="100px" Font-Bold="True">Incident #:</asp:Label>       
				<asp:TextBox id="txtIncid" runat="server" Width="162px"></asp:TextBox></P>
			<P> 
				<asp:Label id="lblassignto" runat="server" Height="18px" Width="120px" Font-Bold="True">Assigned To:</asp:Label>   
				<asp:dropdownlist id="ddlAssignedTo" runat="server">
					<asp:ListItem Value="<Select Assigned To>"><Select Assigned To></asp:ListItem>
				</asp:dropdownlist> 
			</P>
			<P> 
				<asp:Label id="Label3" runat="server" Height="18px" Width="120px" Font-Bold="True">Escalated To:</asp:Label>   
				<asp:dropdownlist id="ddlEscalatedTo" runat="server">
					<asp:ListItem Value="<Select Escalated To>"><Select Escalated To></asp:ListItem>
				</asp:dropdownlist> 
			</P>
			<P>                                 
				<asp:Label id="lblIncidentNotFound" runat="server" Width="412px" Font-Bold="True" Font-Size="Medium" ForeColor="Red"></asp:Label>                                                               
			</P>
			<P>                                                                                            
				        
				<asp:Button id="btnFindIncident" runat="server" Text="Find Incident" Width="120px" Font-Bold="True"></asp:Button>     
			</P>
			<P> </P>
		</asp:panel>
</form>
</body>
</HTML>

Posted

For me to avoid this problem, I always remove the "MS_POSITIONING=GridLayout" in Body tab, and use HTML table to control my interface.

 

Use CSS like: style="Z-INDEX: 101; LEFT: 411px; POSITION: absolute; TOP: 130px", we always need to test and cater from different machines, so I won't allow those programmers under me to do that (only my opinion)

Posted

ok, good, I started using CSS and it's looks much better...

 

I've been creating CSS classes using ONE CSS file...

 

These are my questions:

 

1. For example, in my login page, the <TR> tag has a different width than for example, from second page.

Do i need a CSS file for each page that doesnt have the measurements in common with other pages?? How can i move the "style" tag to CSS..what is the equal of that in CSS??

 

2. How can I add "style" to CSS? For example, in the code below..That table tag doesnt accept "cssClass" element.

 

 

<TABLE id="Table1" [b]height="300" cellSpacing="0" cellPadding="1" width="800" align="center" border="0"[/b]>
			<TR>
				<TD style="WIDTH: 223px; HEIGHT: 46px" bgColor="lightsteelblue"><asp:label id="lblLogin" runat="server" Font-Size="Medium" BackColor="LightSteelBlue" Width="194px">LOGIN</asp:label></TD>
				<TD bgColor="lightsteelblue" style="HEIGHT: 46px"></TD>
			</TR>
			<TR>
				<TD [b]style="WIDTH: 223px"[/b]><asp:label id="lblUerId" runat="server" cssClass="LoginBoxes">UserID:</asp:label></TD>
				<TD><asp:textbox id="txtUserID" runat="server"></asp:textbox>
					<asp:RequiredFieldValidator id="rfvUserID" runat="server" ErrorMessage="   Please enter your UserId" ControlToValidate="txtUserID" Display="Dynamic"></asp:RequiredFieldValidator></TD>
			</TR>

Posted
To include CSS in HTML, use "Class" element, "cssClass" element just use by ASP.NET server control, but finally it will convert to "Class" too. So you can use "Class" element in your Table tag

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...