Search This Blog

Tuesday, October 12, 2010

[Tip] Sometime is hard to say i’m sorry SharePoint 2010

Have you ever face any problem when trying out with no bugs for your SP 2010 master page top navigation? impossible right? The followings are some knowledge sharing from me, hope it helps you…Sp2010 is damn “good”~!

image

It’s auto generated width:3px td in table for each single menu item.

It’s auto generate margin-left: 16px for each single menu item.

Solution :
Look for the AspMenu and add few attributes to the control so that it won’t render the extra pixel on our design…
<SharePoint:AspMenu
                    ID="TopNavigationMenuV4"
                    Runat="server"
                    EnableViewState="false"
                    DataSourceID="topSiteMap"
                    AccessKey="<%$Resources:wss,navigation_accesskey%>"  
                    UseSimpleRendering="false"      …

StaticSelectedStyle-ItemSpacing="0px"
StaticMenuItemStyle-ItemSpacing="0px"
StaticSubMenuIndent = "0px"

After that, you should get something like this screen

image

No comments:

Post a Comment