SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The out of the box HTML of Sharepoint2010 for the left menu (simplerendering) is:

<div class="menu vertical menu-vertical">
    <ul class="root static">
        <li class="static">
            <a class="static menu-item" href="/dg/agri/_layouts/viewlsts.aspx?BaseType=1"
            accesskey="3"><span class="additional-background"><span class="menu-item-text">Libraries</span></span></a>
        <li class="static">
            <a class="static menu-item" title="Policy" href=".."><span class="additional-background"><span class="menu-item-text">Policy</span></span></a>
        <li class="static">
            <a class="static menu-item" title="Working Environment" href="..."><span class="additional-background"><span class="menu-item-text">Working Environment</span></span></a>
        <li class="static">
            <a class="static menu-item" title="Coordination &amp; Communication" href="..."><span class="additional-background"><span class="menu-item-text">Coordination &amp;amp; Communication</span></span></a>

Would it be possible by using the AspMenu properties to change these classes? (static, static menu-item etc..) (no javascript) If not possible through the Page Layout and the Master Page, maybe possible server-side?

share|improve this question
It will be difficult to achieve. Any reason why you'd like to be able to change the classes? – Daniel Ziga Jul 5 '12 at 13:36
Posting as a comment because I have no clue if this will work or not - but you could explore writing a control that inherits from the control the left nav uses, try to get access to the underlying stuffs and make changes that way. Then on your masterpage use your new control instead of the default control. – SpartanDonut Jul 5 '12 at 14:35
I'm actually migrating quite a large SP2007 website which has tens of CSS styles applied to a set of classes so you understand that it would be a timesaver. – George Katsanos Jul 5 '12 at 15:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.