I'm using SharePoint 2013, with the Oslo masterpage, and I've disabled the default navigations and create my own menu in the master page. The issue is that the menu doesn't show what page you are on. I want to add some css to the selected menu item, so that it indicates which page you are on. That would be easy if the menu was on each page, but it's not, it's on the masterpage and I'm not sure how to do it in the masterpage. My menu looks like this:

<nav id="menu" class="cl-effect-1" style="padding-top: 5px; padding-bottom:5px; padding-left:5px; padding-right:5px; font-size:12px; background-color:#E3E3E3; border:1px solid; border-color:#33577F; border-radius:5px; float: right; margin-top:43px; margin-right: 84px;">
                            <a href="http://www.psi2000.com/home/default.aspx" style="font-size:15px; text-decoration: none; color:#33577F;">Home</a>
                            <a href="http://www.psi2000.com/about/default.aspx"style="font-size:15px; text-decoration: none; color:#33577F;">About Us</a>
                            <a href="http://www.psi2000.com/products/default.aspx"style="font-size:15px; text-decoration: none; color:#33577F;">Products</a>
                            <a href="http://www.psi2000.com/services/default.aspx"style="font-size:15px; text-decoration: none; color:#33577F;">Services</a>
                            <a href="http://www.psi2000.com/partners/default.aspx"style="font-size:15px; text-decoration: none; color:#33577F;">Partners</a>
                            <a href="http://www.psi2000.com/careers/default.aspx"style="font-size:15px; text-decoration: none; color:#33577F;">Careers</a>
                            <a href="http://www.psi2000.com/contact/default.aspx"style="font-size:15px; text-decoration: none; color:#33577F;">Contact Us</a>

Does anyone know how to do it in the masterpage?

Thank you.


If you want to put it in the masterpage (e.g. oslo.master) you have to choose the corresponding .html page (e.g. oslo.html). Sounds strange but this is the new way how it works with SharePoint Designer. You can also upload your custom html page, css and images to SharePoint with the Design Manager so that SP convert it to a masterpage

Click here for an example

I've tested your html in oslo.html and it didn't work, because there is no blank space between a.href and style as of the second a-tag

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.