2

Pere the below post I was told the below CSS would hide the Top Bar, Ribbon, and Quick Launch. However, it does not hide the Quick Launch so I added the CSS called "Added CSS" below to hide the Quick Launch. How can I combine this to one CSS block of code. Currently I have 2 CWP in SharePoint that load the 2 txt files that have this CSS.

<style type="text/css">

    #s4-ribbonrow, .ms-cui-topBar2, .s4-notdlg, .s4-pr s4-ribbonrowhidetitle, .s4-notdlg noindex, #ms-cui-ribbonTopBars, #s4-titlerow, #s4-pr s4-notdlg s4-titlerowhidetitle, #s4-leftpanel-content {display:none !important;}

    .s4-ca{margin-left:0px !important; margin-right:0px !important;}

</style>

Added CSS

<style>
.ms-core-navigation { DISPLAY: none }
#contentBox { margin-left: 0px }
</style>
2
  • The answer presented here was useful and is related: sharepoint.stackexchange.com/questions/119567/…
    – Dale C
    Commented Sep 12, 2017 at 18:16
  • I was testing your code, but how can I safe the changes in my page if I don´t have the save button ? Thank you
    – Joe
    Commented May 28, 2018 at 4:29

2 Answers 2

5

Yes, you can combine them into a single style block and only use 1 web part.

<style type="text/css">
    #s4-ribbonrow, .ms-cui-topBar2, .s4-notdlg, .s4-pr s4-ribbonrowhidetitle, .s4-notdlg noindex, #ms-cui-ribbonTopBars, #s4-titlerow, #s4-pr s4-notdlg s4-titlerowhidetitle, #s4-leftpanel-content {display:none !important;}
    .s4-ca {margin-left:0px !important; margin-right:0px !important;}
    .ms-core-navigation { display: none; }
    #contentBox { margin-left: 0; }
</style>
1
  • 2
    It is working! But How can I edit the page again? Commented May 1, 2019 at 15:15
3

The answer above was still giving me space between the left side of the window and my content. I made a small adjustment and it seems to work:

<style type="text/css">
    #s4-ribbonrow, .ms-cui-topBar2, .s4-notdlg, .s4-pr s4-ribbonrowhidetitle, .s4-notdlg noindex, #ms-cui-ribbonTopBars, #s4-titlerow, #s4-pr s4-notdlg s4-titlerowhidetitle, #s4-leftpanel-content {display:none !important;}
    .s4-ca {margin-left:0px !important; margin-right:0px !important;}
    .ms-core-navigation { display: none; }
    #sideNavBox { DISPLAY: none }
    #contentBox { margin-left: 0px }
</style>
0

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