Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ASP.net Change Panels to sit side by side rather than one under the other

Hi. I am using the following markup for two calendars. They have to each be on their panel for my functionality to work.
They currently sit one under the other. How do I get them to sit side by side?

User generated image
   <asp:Panel ID="PanelFromDate" runat="server" onclick="PanelFromDateClick2();">           
       <asp:Image ID="Image1" runat="server" Height="40px" ImageUrl="~/Resources/CalendarIcon.png" Width="40px" />
            <br />
            <asp:Label ID="lblFromDate" runat="server"></asp:Label>        
   </asp:Panel>

       <asp:Panel ID="PanelToDate" runat="server" onclick="PanelToDateClick2();">
            <asp:Image ID="Image2" runat="server" Height="40px" ImageUrl="~/Resources/CalendarIcon.png" Width="40px" />
                   <br />
            <asp:Label ID="lblToDate" runat="server"></asp:Label>  
            &nbsp;&nbsp;
            <asp:Label ID="lblDateError" runat="server" ForeColor="Red"></asp:Label>
        </asp:Panel>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Obadiah Christopher
Obadiah Christopher
Flag of India image

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 Murray Brown

ASKER

thanks but that doesn't work
what about two floating divs in that div
<div style="width:100%;"> <!-- Main Div -->

        <div style="float:left; width:100px;">

             <asp:Panel ID="PanelFromDate" runat="server" onclick="PanelFromDateClick2();">           
      
                   <asp:Image ID="Image1" runat="server" Height="40px" ImageUrl="~/Resources/CalendarIcon.png" Width="40px" />
                        <br />
                   <asp:Label ID="lblFromDate" runat="server"></asp:Label>        
             
             </asp:Panel>
        </div>
       
       <div style="float:left; width:100px; margin-left:10px;">
      
            <asp:Panel ID="PanelToDate" runat="server" onclick="PanelToDateClick2();">
              <asp:Image ID="Image2" runat="server" Height="40px" ImageUrl="~/Resources/CalendarIcon.png" Width="40px" />
                   <br />
              <asp:Label ID="lblToDate" runat="server"></asp:Label>  
              &nbsp;&nbsp;
             
           </asp:Panel>

        </div>
   </div>

Open in new window

all working. Thanks for the <div> idea