In my Site.master, I have a menu.
<asp:Menu ID="NavigationMenu" runat="server" ItemWrap="true" Orientation ="Horizontal" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false">
<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"/>
<asp:MenuItem NavigateUrl="~/_UILayer1/ComplaintReportForm.aspx" Text="Complaints"/>
<asp:MenuItem NavigateUrl="~/_UILayer1/FMMAnalytics1.aspx" Text="Analytics"/>
<asp:MenuItem NavigateUrl="~/_UILayer1/PollResults.aspx" Text="Sold Items<br/>PollResults"/>
<asp:MenuItem NavigateUrl="~/_UILayer1/PollResults.aspx" Text="Contact Us<br/>Reports"/>
<asp:MenuItem NavigateUrl="~/_UILayer1/PollResults.aspx" Text="Approve Business<br/> Users<br/> Scheme 0 members" />
<asp:MenuItem NavigateUrl="~/_UILayer1/PollResults.aspx" Text="Check Duplicate<br/> Profiles" />
<asp:MenuItem NavigateUrl="~/_UILayer1/PollResults.aspx" Text="Coupons"/>
</Items>
</asp:Menu>
There are 10 menuiitems that three of the menu items are falling on the next line. How do I adjust the width or the font of these m开发者_如何学Pythonenu items and have all these menuitems on one line
Thanks Sun
You have this in your parent tag:
ItemWrap="true"
Maybe set that to false instead?
You may change the font size through CSS to fit all the menu items in one line. It will depend on your screen resolution but I think font size 10px will fit all the menus for a full screen browser. Here is the CSS. You may keep on changing the font size until you are satisfied.
div.menu
{
padding: 4px 0px 4px 8px;
}
div.menu ul
{
list-style: none;
margin: 0px;
padding: 0px;
width: auto;
}
div.menu ul li a, div.menu ul li a:visited
{
background-color: #465c71;
border: 0.8px #4e667d solid;
color: #dde4ec;
display: block;
line-height: 1em;
padding: 4px 10px;
text-decoration: none;
font-size: 10px;
white-space:pre-wrap;
}
div.menu ul li a:hover
{
background-color: #bfcbd6;
color: #465c71;
text-decoration: none;
}
div.menu ul li a:active
{
background-color: #465c71;
color: #cfdbe6;
text-decoration: none;
}
精彩评论