CHunky Universe of Vigourous Astonishing SHarepoint :)

Hide my site link with css

Want to hide my site link without disabling social features.
my site link

Well, the simplest way to do it is to use css:

#mp1_0_0_Anchor { display: none; }

If you want to hide my profile instead, just hide #mp1_0_1_Anchor:

#mp1_0_1_Anchor {
    display: none;

As John and Vishal mentioned, it doesn’t work, because these IDs are generated dynamically. If you have to hide this link, you must use attribute selectors like:

.ms-MenuUIUL li[text='My Site'] { display: none;}
Disable the my profile feature
An even better solution is maybe to disable the ability to change the profiles. Just remove the permission to “user personalization…” for All authenticated users in User Profile Service.

9 responses to “Hide my site link with css

  1. John 2012-03-07 at 00:15

    Be careful this cannot be used, the classes for pop up menus are generated dynamically on the page, and that class can be applied to a number of menus I assume depending on the order which they load on the page, which isnt the same every time, so for instance this hides something in the site actions menu, or the new button on a library sometimes.

    • Anatoly Mironov 2012-03-07 at 09:10

      You are totally right, John! I realized that too. Fortunately, I didn’t need that then. But while using that I saw that sometimes Site Actions -Edit Page disappeared. These IDs are really generated dynamically. Thanks for your comment. I’ll update my post.

  2. vishal 2012-03-07 at 07:27

    Hi Anatoly. Thanks for the solution. but the problem we are facing one problem after implementing this.
    Once we make this change and when login to the portal next time, the “Edit Page” link under site action menu is not getting displayed and the My Site Link is getting displyed. any suggestion?

    • Anatoly Mironov 2012-03-07 at 09:24

      Hi Vishal. Unfortunately we cannot rely on these IDs, as John in previous comment mentioned, because these IDs are generated dynamically. I’ll update my post. One possible solution would be use attribute selectors… Something like .ms-MenuUIUL li[text=’My Site’] { display: none;}

  3. Fredrik 2012-03-09 at 15:27

    Thank you Anatoly, that worked perfectly in all browsers! I had problems with the first suggested solution, because it would hide other menu items, like “edit this page” from the site settings dropdown!

  4. Brett Anderson 2012-05-02 at 06:13

    Hi, The amended solution does not work in IE7.

  5. Pingback: Material SharePoint » Hide ‘My Site’ Link from Welcome User Dropdown Control

  6. jim 2014-02-12 at 17:38

    .ms-welcomeMenu #mp1_0_0{
    .ms-welcomeMenu #mp1_0_1{
    .ms-welcomeMenu #mp1_0_2{
    .ms-welcomeMenu #mp1_0_3{
    .ms-welcomeMenu #mp1_0_4{
    .ms-welcomeMenu #mp1_0_8{
    .ms-welcomeMenu #mp1_0_9{

    these work for me.

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

Daniel Chronlund Cloud Tech Blog

News, tips and thoughts for Microsoft cloud fans

Вула Чăвашла

VulaCV - Чăвашла вулаттаракан сайт

Discovering SharePoint

And going crazy doing it

Bram de Jager - Architect, Speaker, Author

Microsoft 365, SharePoint and Azure

SharePoint Dragons

Nikander & Margriet on SharePoint

Mai Omar Desouki

PFE @ Microsoft

Cameron Dwyer

Office 365, SharePoint, Azure, OnePlace Solutions & Life's Other Little Wonders


Me and My doings!

Share SharePoint Points !

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

Aryan Nava

DevOps, Cloud and Blockchain Consultant


SharePoint for everyone


Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint


Mostly what I know and share about...

%d bloggers like this: