如何始终设置总菜单宽度100%固定(屏幕宽度) [英] How to set total menu width 100% Fixed(Screenwirdth) always

查看:115
本文介绍了如何始终设置总菜单宽度100%固定(屏幕宽度)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有菜单.它包含Home,Master,Transaction等.

根据我的角色,我将隐藏某些菜单.

但是,在所有情况下,我的菜单宽度都应该在屏幕上固定为100%.

该怎么做...?

查看我的菜单
-----------

Hi,

I have the menu. it contains Home,Master,Transaction,etc.

Based on my roles i will do certain menu''s are hiding.

But, my menu width should be 100% fixed in Screen in all the cases.

How to do this...?

see my menu
-----------

<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" RenderingMode="List">            
            <Items>
                <asp:MenuItem NavigateUrl="~/Home.aspx"  Text="Home" Value="Home"  />
                <asp:MenuItem  Text="Master" Value="first"> 
                        <asp:MenuItem  Text="Admin" Value="Admin"></asp:MenuItem> 
                        <asp:MenuItem Text="Prod" Value="Pro"></asp:MenuItem> 
                        <asp:MenuItem  Text="MaP" Value="Mr"></asp:MenuItem> 
                        <asp:MenuItem Text="Cory" Value="Cy"></asp:MenuItem> 
                        <asp:MenuItem Text="Ponal" Value="ap"></asp:MenuItem> 
                </asp:MenuItem> 
                <asp:MenuItem  Text="Transaction" Value="Second"> 
                        <asp:MenuItem  Text="Dment Activities" Value="DX"></asp:MenuItem> 
                        <asp:MenuItem Text="put" Value="SA"></asp:MenuItem> 
                        <asp:MenuItem Text="Powr" Value="KP"></asp:MenuItem> 
                </asp:MenuItem> 
                 <asp:MenuItem  Text="Reports" Value="Third"> 
                        <asp:MenuItem  Text="Reports" Value="Reports"></asp:MenuItem> 
                        <asp:MenuItem  Text="Power" Value="AL"></asp:MenuItem> 
                        <asp:MenuItem Text="All" Value="XY"></asp:MenuItem> 
                </asp:MenuItem> 
                <asp:MenuItem NavigateUrl="~/arts.aspx"  Text="arts" Value="charts"  />
            </Items>
        </asp:Menu>

推荐答案

在菜单标签中添加这两个标签.
Add these two tags inside menu tag..

<staticmenustyle width="100%" />
<staticmenuitemstyle width="100%" />



希望对您有帮助.



hope it helps..


<asp:menu id="Menu1" runat="server" orientation="Horizontal" renderingmode="List" width="100%"></asp:menu>



确保您没有为此asp:menu的父标记指定任何宽度,以便菜单将以屏幕宽度的宽度显示.

使用母版"页面中的菜单,以便将其显示为其所有内容页面通用的



make sure that you don''t specify any width for parent tag of this asp:menu so that menu will displayed with the width of screen width.

Use menu in Master page so that it will be displayed common to all its content pages


这篇关于如何始终设置总菜单宽度100%固定(屏幕宽度)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆