asp.net css内联格式化

时间:2014-04-14 20:34:24

标签: asp.net css

我正在使用2个菜单,每个菜单上面都有一个标签。我试图将它们并排排列,但是我遇到了麻烦。它表现得好像在<br/>#MenuFooter1之间存在#MenuFooter2。请注意,我在标签后面使用了<br/>。目前的结果:http://i.imgur.com/OzT4HrJ.png

<div id="footer">
     <div class="MenuFooter1"> 
     <asp:Label ID="lblAdvantages" runat="server" Text="Advantages" ForeColor="#ab2548" Font-Bold="False" Font-Size="Large"></asp:Label><br />

      <telerik:RadMenu ID="MenuFooter1" runat="server" OnClientItemClicked="MenuNavBar_ItemClicked" Skin="Transparent" Flow="Vertical" >
        <Items>                 
            <telerik:RadMenuItem runat="server" Text="Why ?" NavigateUrl="http://" Font-Bold="False" Font-Size="Large" BackColor="White" BorderColor="White" ForeColor="#999999" Font-Names="Arial">
            </telerik:RadMenuItem>              
            <telerik:RadMenuItem runat="server" Text="View the Data" NavigateUrl="http://" Font-Size="Large" BackColor="White" BorderColor="White" ForeColor="#999999" Font-Names="Arial">
            </telerik:RadMenuItem>              
            <telerik:RadMenuItem runat="server" Text="Advocates" NavigateUrl="http://" Font-Size="Large" BackColor="White" BorderColor="White" ForeColor="#999999" Font-Names="Arial">
            </telerik:RadMenuItem>

        </Items>
    </telerik:RadMenu>
    </div>
    <div class="MenuFooter2" >
        <asp:Label ID="Label1" runat="server" Text="Advantages" ForeColor="#ab2548" Font-Bold="False" Font-Size="Large"></asp:Label><br />
     <telerik:RadMenu ID="MenuFooter2" runat="server" OnClientItemClicked="MenuNavBar_ItemClicked" Skin="Transparent" Flow="Vertical" style="top: 0px; left: 0px">
        <Items>                 
            <telerik:RadMenuItem runat="server" Text="Why?" NavigateUrl="http://" Font-Bold="False" Font-Size="Large" BackColor="White" BorderColor="White" ForeColor="#999999" Font-Names="Arial">
            </telerik:RadMenuItem>              
            <telerik:RadMenuItem runat="server" Text="View the Data" NavigateUrl="http://" Font-Size="Large" BackColor="White" BorderColor="White" ForeColor="#999999" Font-Names="Arial">
            </telerik:RadMenuItem>              
            <telerik:RadMenuItem runat="server" Text="Advocates" NavigateUrl="http://" Font-Size="Large" BackColor="White" BorderColor="White" ForeColor="#999999" Font-Names="Arial">
            </telerik:RadMenuItem>

        </Items>
    </telerik:RadMenu>
     </div> 
    </div>

CSS

#footer {
        padding:80px;
        display:inline;
        }

     .MenuFooter1, .MenuFooter2 {
        display:block;}

1 个答案:

答案 0 :(得分:1)

block更改为inline-block

 #MenuFooter1, #MenuFooter2 {
        display:inline-block;}