0

I have a modern SPO page and i want to hide the text "Add Link" using CSS. I found the class and used the below style in Modern Script editor webpart to hide the text but it is not working:

Can someone tell me what i am doing wrong?

enter image description here

<style type="text/css">
.ms-HorizontalNavItem {
display: none !important;
}
</style>

HTML Element Details:

enter image description here

2
  • Can you please post a screen capture about the html element details in Developer Tool (F12) ?
    – Jerry
    Nov 11, 2020 at 6:30
  • @Jerry_MSFT Screenshot of HTML element details added
    – George
    Nov 11, 2020 at 11:56

1 Answer 1

0

You can try to modify as below:

<style type="text/css">
  button.ms-HorizontalNavItem-link {
  display: none !important;
  }
</style>
2
  • Even this did not work.
    – George
    Nov 12, 2020 at 11:47
  • Try to trace the css style using Developer Tool to see if it applied. If the same issue not working, try to use id selector : button#HorizontalNav1EditLink
    – Jerry
    Nov 13, 2020 at 1:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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