如何设置web.sitemap菜单项的样式? [英] How to style a web.sitemap menu items?

查看:119
本文介绍了如何设置web.sitemap菜单项的样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,



根据我的看法,web.sitemap是一个xml文件。我如何用CSS设置样式,以便我的每个菜单项都可以分开?截至目前我的菜单项都在左侧。



这是web.sitemap

 < span class =code-keyword>< ?xml version =   1.0 encoding =   utf-8>  
< siteMap xmlns = http://schemas.microsoft.com/AspNet/SiteMap- File-1.0 >


< siteMapNode url = Default.aspx title = 主页 description = 转到主页 >
< siteMapNode url = 〜/ title = Home description = 主页 />

< siteMapNode url = 〜/ Forum / Forum.aspx title = 论坛 description = 转到论坛 >
< siteMapNode url = 〜/ Forum / AnimeForum.aspx title = 动漫 description = 动漫讨论 />
< siteMapNode url = 〜/ Forum / GamesForum.aspx title = 游戏 description = 游戏讨论 />
< siteMapNode url = 〜/ Forum / HardwareForum.aspx title = 硬件 description = 硬件讨论 />
< siteMapNode url = 〜/ Forum / SoftwareForum.aspx title = 软件 description = 软件讨论 />
< / siteMapNode >

< siteMapNode url = ContentList.aspx title = 内容 description = 转到评论和新闻 >
< / siteMapNode >

< siteMapNode url = < span class =code-string> VideoList.aspx title = < span class =code-string>视频 description = 转到视频 >
< / siteMapNode >
< / siteMapNode >
< / siteMap >









这是我母版页上的代码

< pre lang =c#>< asp:菜单ID = Menu1 runat = server CssClass = MainMenu DataSourceID = SiteMapDataSource1 Orientation = 水平 StaticEnableDefaultPopOutImage = False >

解决方案

看看这个 SlickMap [ ^ ]。



http://forums.asp.net/t/1635691.aspx [ ^ ]或者你们对于ul-li结构很多。请参阅演示 [ ^ ]。



我想问你你不能去内联CSS? />


-KR


嘿伙计们我现在买了。



我在导航标签中添加了staticMenuItemStyle并对其进行了识别,以便我可以在css中调整它。



谢谢,


Hey guys,

Based on what I see web.sitemap is an xml file. How can I style with CSS it so each of my menu item can be separated? as of now my menu items are all in left side.

Here's the web.sitemap

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
        
         
        <siteMapNode url="Default.aspx" title="Home"  description="Go to HomePage">
        <siteMapNode url="~/" title="Home"  description="Home"/>
    
        <siteMapNode url="~/Forum/Forum.aspx" title="Forums" description="Go to Forums" >
        <siteMapNode url="~/Forum/AnimeForum.aspx" title="Anime"  description="Anime Discussion" />
        <siteMapNode url="~/Forum/GamesForum.aspx" title="Games"  description="Gaming Discussion" />
        <siteMapNode url="~/Forum/HardwareForum.aspx" title="Hardware"  description="Hardware Discussion" />
        <siteMapNode url="~/Forum/SoftwareForum.aspx" title="Software"  description="Software Discussion" />
        </siteMapNode>
  
        <siteMapNode url="ContentList.aspx" title="Content"  description="Go to Reviews and News">
        </siteMapNode>

        <siteMapNode url="VideoList.aspx" title="Video"  description="Go to Videos" >
        </siteMapNode> 
    </siteMapNode>
</siteMap>





Here's the code on my master page

<asp:Menu ID="Menu1" runat="server" CssClass="MainMenu" DataSourceID="SiteMapDataSource1" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False">

解决方案

Well see this SlickMap[^].

http://forums.asp.net/t/1635691.aspx[^] or you many fo for ul-li structure. See the demo[^].

And I wanted to ask you that "can't you go for inline CSS ?"

-KR


Hey guys I got it now,.

I add staticMenuItemStyle in the navigation tag and id it so I can tweak it in the css.

Thank you,


这篇关于如何设置web.sitemap菜单项的样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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