2

I'm currently trying to add a Watermark Logo or text to the bottom of every Sharepoint site/Subsite.

Can anyone recommend an effective way to do so?

I've tried various incarnations of CSS using the Master Page's CSS file. The closest I can get is a repeating background image of my watermarked logo using:

body.ms-backgroundImage { background: url(/my/image.png); }

I've tried various things such as no-repeat, trying to fix the position and even !important tags to try position this Watermarked image but to no avail.

Anything else I can try?

6
  • 1
    Do you have permission to edit master pages? If yes, then within s4-bodyContainer div, insert another div with position fixed to bottom of page and within it place an image. That can solve your problem. Jul 11, 2017 at 14:52
  • Yes full permissions to access the master page and apply a custom CSS file.
    – cod3r_jim
    Jul 11, 2017 at 14:55
  • You want to have this watermark logo as to be sticky on the bottom of the page or like you need to scroll to the bottom of the page to view this logo?
    – Pradip R.
    Jul 11, 2017 at 15:00
  • Ideally sticky, so I've also looked at using a sticky footer as one of the options but still would like to know both options just so I have some flexibility. In terms of adding the s4-bodyContainer div, currently adding that to my master page.
    – cod3r_jim
    Jul 11, 2017 at 15:02
  • Do not forget that you should never modify the original masterpage files. Make a copy of Seattle or Oslo and male your changes there. Jul 11, 2017 at 16:01

2 Answers 2

2

Kindly use the following code in you master page. Add it just above the closing body tags.

<div style="position:fixed; bottom: 10px; right: 10px; width: 40px; height: 100px;" class="s4-notdlg ms-dialogHidden">
        <img src="asd.png" alt="no image text" />
    </div>

This will give an image on the right bottom corner of your page. Also note that I had added two classes to the wrapping div. The use of these class is to hide the image/watermark from the dialogs box. The first class name is for SP2010 while the other works for SP2013 and SP2016.

Adding the image below of my master page to give you idea where i put this in master page.

enter image description here

1
  • Absolutely spot on. Works a treat.
    – cod3r_jim
    Jul 11, 2017 at 16:23
2

As per you comment, you can update masterpage.

Simply add following snippet before s4-bodyContainer:

<div class="s4-notdlg ms-dialogHidden" style="
position: absolute;
bottom: 0;
right: 20px;
z-index: 1000000;
opacity: 0.7;
">
    <img src="https://www.google.co.in/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" border="0">
</div>

This will make watermark like sticky icon on every page as below screen.

enter image description here

Later on you can put this inline style to your css by specifying the class.

Also you can specify any content within that div to update your watermark content.

Hope this helps!

3
  • 1
    The problem will be, this will be visible on all the pages including OOTB dialog box. Just wrap the div with s4-notdlg ms-dialogHidden classes so it wont cause any issue on dialog box. Jul 11, 2017 at 15:15
  • Oh yes, that's correct. Thanks for the notation. Answer updated!!
    – Pradip R.
    Jul 11, 2017 at 15:21
  • 1
    Thank you for the help as well Pradip, this code will also come in handy. Much appreciated.
    – cod3r_jim
    Jul 12, 2017 at 8:11

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.