English 中文(简体)
男子品高
原标题:menu items height
  • 时间:2011-08-03 00:45:24
  •  标签:
  • asp.net

In Site.master, How I do set the height of navigation menu items. I want all the menu items to have equal height and centered text.

 <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" StaticMenuItemStyle-Height="148px" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal" 
                 StaticSelectedStyle-CssClass="selected" >
                <Items>
                    <asp:MenuItem   NavigateUrl="~/_UILayer1/AdminAcctInfo.aspx"  Text="Admin Profile <br/>Info"/>
                    <asp:MenuItem  NavigateUrl="~/_UILayer1/BUsersAcctInfo.aspx" Text="Business Users <br/>Profile Info"/>
                    <asp:MenuItem  NavigateUrl="~/_UILayer1/FMMPublication.aspx" Text="Publication"/>

                </Items>
            </asp:Menu>       

无论是法定标准还是高标准选择似乎都没有工作。

Thanks Sun

最佳回答

您没有列入《社会保障法》课程,但这应该让你们:

<asp:Menu ID="NavigationMenu" runat="server"  StaticMenuItemStyle-CssClass="MenuItem"
    Orientation="Horizontal"  >
    <Items>
        <asp:MenuItem NavigateUrl="~/_UILayer1/AdminAcctInfo.aspx" Text="Admin Profile <br/>Info" />
        <asp:MenuItem NavigateUrl="~/_UILayer1/BUsersAcctInfo.aspx" Text="Business Users <br/>Profile Info" />
        <asp:MenuItem NavigateUrl="~/_UILayer1/FMMPublication.aspx" Text="Publication"  />
    </Items>
</asp:Menu>

CSS 班级:

.MenuItem
{
    height: 150px; 
    text-align: center;
}
问题回答

这一帮助吗? MenuItem 个人风格

或视您的网络版本而定(这方面的青年需要4.0)





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签