Link to home
Start Free TrialLog in
Avatar of Peter Chan
Peter ChanFlag for Hong Kong

asked on

Problem to alignment

Hi,
I want to align Label and DDL below on fixed position, like
User generated image
How to adjust it below?
    <div id="popup1">
    <ASPP:PopupPanel ID="pup" 
              runat="server">
        <PopupWindow runat="server">
            <ASPP:PopupWindow ID="PopupWindow1" runat="server">
                <div align="center" style="width: 700px; height: 420px">
                    <asp:Label ID="Label3" Text="我是來自國家" runat="server" />
                    <asp:DropDownList ID="pop_country_ddl" OnSelectedIndexChanged="pop_country_ddl_value_changed" Width="190px" runat="server">
                    </asp:DropDownList>
                    <br />
                    <asp:Label ID="Label4" Text="城市" runat="server" />
                    <asp:DropDownList ID="pop_city_ddl" AutoPostBack="true" Width="190px" runat="server">
                    </asp:DropDownList>
                </div>
            </ASPP:PopupWindow>
        </PopupWindow>
    </ASPP:PopupPanel>
    </div>

Open in new window

Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Structurally you would want something like:
    <div align="center" style="width: 700px; height: 420px">
        <div>
            <asp:Label ID="Label3" Text="我是來自國家" runat="server" style="display:inline-block;width:100px;" />
            <asp:DropDownList ID="pop_country_ddl" Width="190px" runat="server">
            </asp:DropDownList>
        </div>
        <div>
            <asp:Label ID="Label4" Text="城市" runat="server" style="display:inline-block;width:100px;" />
            <asp:DropDownList ID="pop_city_ddl" AutoPostBack="true" Width="190px" runat="server">
            </asp:DropDownList>
        </div>
    </div>

Open in new window

Although you might need to add an additional align style to the Labels if you want the text aligned to the left or right, rather than centred.
Avatar of Peter Chan

ASKER

I want the text to be aligned to the left.
ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland 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