tags:

views:

159

answers:

1

I've tried this :

  <div id="xDiv" align="left">
       <div id="divX" runat="server" style="margin-left:40px; width: 650px;" 
           align="center">
  <asp:Menu ID="Menu3" runat="server" Orientation="Horizontal" Width="100%" 
                       StaticSelectedStyle-CssClass="StaticSelectedStyle" Height="52px" 
                       StaticSubMenuIndent="18px" oninit="Menu3_Init">
     <StaticSelectedStyle CssClass="StaticSelectedStyle"></StaticSelectedStyle>
     <Items>
        <asp:MenuItem Text="Test" />
     </Items>
  </asp:Menu>
  </div>
    <div runat="server">
        <asp:DropDownList ID="DropDownList3" runat="server" 
            DataSourceID="SqlDataSource1" DataTextField="RepGroup_Name" 
            DataValueField="RepGroup_ID" Width="162px">
        </asp:DropDownList>
    </div>
  </div>

but it puts DropDownList not to the end of line , it puts it on a new line.

+3  A: 

You need to a simple Css Class as follows:

.Menu
{
    display: inline-block;
}

<asp:Menu ID="Menu1" runat="server" CssClass="Menu" />
<asp:DropDownList ID="DropDownList1" runat="server" />

Update

<div id="xDiv" align="left">
    <div id="divX" runat="server" style="margin-left: 40px; width: 650px; float: left;" align="center">
        <asp:Menu ID="Menu3" runat="server" Orientation="Horizontal" Width="100%" StaticSelectedStyle-CssClass="StaticSelectedStyle"
            Height="52px" StaticSubMenuIndent="18px">
            <StaticSelectedStyle CssClass="StaticSelectedStyle"></StaticSelectedStyle>
            <Items>
                <asp:MenuItem Text="Test" />
            </Items>
        </asp:Menu>
    </div>
    <div id="Div1" runat="server" style="float: left;">
        <asp:DropDownList ID="DropDownList3" runat="server" Width="162px">
            <asp:ListItem Text="Item1" Value="Item1" />
        </asp:DropDownList>
    </div>
</div>
Mehdi Golchin
oh... thank you ^_
nCdy
But it made no sense >___<
nCdy
trying update ..........
nCdy
Oh sorry, it works for me. Anyway, I have changed my answer, take a look at it please. Also deaccept my answer.
Mehdi Golchin
works fine now ^_ TY !
nCdy