Link to home
Start Free TrialLog in
Avatar of allanmark
allanmark

asked on

Position ASP Labels and ASP Textboxes, using CSS

Greetings all

I am busy looking at how to position Asp Textboxes and Asp Labels within my page:

1.  With regard to position them underneath each other, I could do one of two things (the only ways that I
     know) - see Snippet 1 & 2.  Are these ok? Are there others?

2. With positioning on the same line, I'm not sure how I get the spacing right, unless I used a style property
    and say left=123px". This doesn't soudn like the best option! Are there btter ways?


In advance, thanks!!

   allanmark
SNIPPET 1:
 
	<asp:Panel ID="pnlLoggedIn" runat="server">
            <asp:Label ID="lblUsername" runat="server"></asp:Label>
	    <br/>
            <asp:Label ID="Label2" runat="server">New password: </asp:Label>
            <asp:TextBox ID="txtPassword" runat="server"></asp:TextBox>
	    <br/>
            <asp:Label ID="Label3" runat="server">Comform password:</asp:Label>        
        </asp:Panel>
 
 
SNIPPET 2:
 
<ul id="newUsers">
<li>First Name:  <asp:textbox runat="server" id="txtFirstName"/>
<li>Last Name: <asp:textbox runat="server" id="txtLastName"/>
<li>Username: <asp:textbox runat="server" id="txtUserName"/>
<li>Password: <asp:textbox runat="server" id="txtPassword"/>
</ul>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of joeylu
joeylu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of allanmark
allanmark

ASKER

Many thanks!!!