Click here to Skip to main content
15,210,660 members
Rate this:
Please Sign up or sign in to vote.
See more:
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">
Posted
Updated 3-Mar-14 2:24am
v3
Rate this:
Please Sign up or sign in to vote.

Solution 1

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
   
Comments
KatsuneShinsengumi 3-Mar-14 12:17pm
   
Hey man, basically I declared the menu using Data Binding to an XML Data Source, what I need to know is how can I tweak the style of the menus that are defined in the XML Data Source
Rate this:
Please Sign up or sign in to vote.

Solution 2

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,
   
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100