Patrick's SharePoint Blog

SharePoint's Booming world

Styling the Welcome menu

Posted by Patrick Boom on February 22, 2011

Sometimes I wonder why MS makes some things so hard to do. During the styling of our project, we wanted to move the Welcome menu, also known as the user menu or Personal Action menu to another location on the page.

The control is easy to find and is basically a user control located in the ControlTemplates folder in the 14 hyve. However, that control only defines the menu structure of the control, not the appearance. I started to worry a little, as that probably means that the appearance of the control is defined in code.

Posts by Erik Svenson and Shehan Peruma showed how to change the link color. But I hope that is not the only stuff you can change in the control. How would you ever integrate this into a new publication design?

Hence, I decided to call my favourite friend called Reflector again and dive into the code of SharePoint. Turns out the behaviour of the control is determined by two classes in the CSS, called ms-SPLink ms-SpLinkButtonActive ms-welcomeMenu and ms-SPLink ms-SpLinkButtonInActive ms-welcomeMenu, controlling the active and inactive state respectively.

Basically, the most important part to look for in the Corev4.css (in the Themable folder for publishing sites) is the ms-welcomeMenu class and the classes derived from that. Controlling the font color, family, background and other options is quite easily done through these classes:

.ms-welcomeMenu {
   padding:2px 5px 3px;
   margin:0px 3px;
   border:0px solid transparent;
.ms-welcomeMenu a:link {
.ms-welcomeMenu a:hover {
   text-decoration:none !important;
} {
/* [ReplaceColor(themeColor:”Dark2-Lighter”)] */
/* [RecolorImage(themeColor:”Dark2-Lightest”,includeRectangle:{x:0,y:489,width:1,height:11})] */
   background: url(../img/backgrounds/bg-sprite-tabbar.png) 100% 0 no-repeat;
/* [ReplaceColor(themeColor:”Dark2″,themeShade:”0.8″)] */
} a:link {
/* [ReplaceColor(themeColor:”Light1″,themeTint:”0.9″)] */

What I did in above CSS override is changing .ms-welcome a:link and .ms-welcome a:hover to change the font color of the inactive state.
To change to color of the font as soon as the mouse is over it, add the style a:link.

Secondly, I have overridden the background in to show a custom made image. If IU left it, it would show the dark background of the top bar, which is something I do not want on a white background ;-).

By default, the ms-welcomeMenu has a transparent background in the inactive state, as it should be and therefore blends in into its container. Remember though that you should override these classes in a separate CSS file and be sure it is loaded last (or at least after Corev4.css) in the master page. Also, you cannot remove any styles, just override the settings already made.

Finally, you can do the same for the SiteActions menu. You can do that by looking for the classes called .ms-siteactionsmenu.


11 Responses to “Styling the Welcome menu”

  1. rajesh said

    Hi thanks for your post,

    But i When you try to logout the drop down box has some text hidden.i want move login name to left
    Could please suggest me..

  2. […] […]

  3. Thank you for every other fantastic post. The place else could anybody get that kind of info in such an ideal manner of writing? I have a presentation subsequent week, and I’m on the look for such info.

  4. related web site

    Styling the Welcome menu « Patrick’s SharePoint Blog

  5. click the following post

    Styling the Welcome menu « Patrick’s SharePoint Blog


    Styling the Welcome menu « Patrick’s SharePoint Blog

  7. federal reserve bank

    Styling the Welcome menu « Patrick’s SharePoint Blog

  8. pet transport service

    Styling the Welcome menu « Patrick’s SharePoint Blog

  9. linked internet page

    Styling the Welcome menu « Patrick’s SharePoint Blog

  10. herbal treatment for

    Styling the Welcome menu « Patrick’s SharePoint Blog


    Styling the Welcome menu « Patrick’s SharePoint Blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: