Problem lining up objects on a web page.

Posted on 2007-10-03
Last Modified: 2010-04-09
I am doing a aspx page in  Trying to get a few objects to line up and what a pain in the butt.  Here is the following code.  I am trying to get the the dropdownlist and the checkbox list to be next to each other with a few spaces in it.  No matter what I do it doestnt work.  Please help.  Here is the code.

<asp:panel id="Panel1" style="Z-INDEX: 103; LEFT: 128px; POSITION: absolute; TOP: 103px" runat="server"
                        Height="700px" Width="830px" HorizontalAlign="Center" BackColor="Transparent" BorderColor="White"
                        BackImageUrl=" copy.jpg">
                        <DIV id="center_menu_id" align="center"></DIV>
                        <P align="left">&nbsp;&nbsp;&nbsp;</P>
                        <P align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<STRONG>Select
                                    Property to Search</STRONG></P>
                        <P align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                              <asp:DropDownList id="ddProperties" runat="server" Width="231px"></asp:DropDownList>
                              <asp:CheckBoxList id="CheckBoxList1" runat="server"></asp:CheckBoxList></P>
                        <P align="left">&nbsp;</P>
                        <P align="left">&nbsp;</P>
                        <P align="left">&nbsp;</P>
                        <P align="left">&nbsp;</P>
                        <P align="left">&nbsp;</P>
                        <P p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                              <asp:Button id="Button1" runat="server" Width="114px" Height="37px" Text="Begin Search"></asp:Button></P>
                              <asp:DataGrid id="dgResidents" runat="server" Width="679px" Height="132px" BackColor="Aqua" AutoGenerateColumns="False">
                                    <SelectedItemStyle BackColor="Blue"></SelectedItemStyle>
                                    <HeaderStyle ForeColor="White" BackColor="Black"></HeaderStyle>
                                          <asp:BoundColumn DataField="aptnumber" HeaderText="Apt No."></asp:BoundColumn>
                                          <asp:BoundColumn DataField="name1" HeaderText="Resident Name"></asp:BoundColumn>
                                          <asp:ButtonColumn Text="Button" DataTextField="tenantid" HeaderText="Resident ID" CommandName="PickResident"></asp:ButtonColumn>
                                          <asp:BoundColumn Visible="False" HeaderImageUrl="Tenantid" DataField="tenantid"></asp:BoundColumn>
Question by:mgmhicks
    LVL 4

    Accepted Solution

    Put a table inside your panel with the appropriate # of row and columns. Set the table to 100% wide (to size to your panel). Set the border to 0 (to make invisible). Place all the controls in the cells of the table and they will line up great.

    LVL 23

    Expert Comment

    by:Christopher Kile
    Have you tried using POSITION: RELATIVE in your style on the controls in the panel, then tried setting the position using LEFT and TOP in the style statement with the coordinates relative to the client area of the panel?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Do you want to insert HTML5 video into your site? This is the tutorial how to do so. What are the main advantages of HTML5 video? 1) Have good compression, good image quality, and low decode processor use. 2) It is royalty-free 3) It is easi…
    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now