Anybody ever successfully used list-style-image css property in a ul list embedded in a SharePoint Content Editor web part?

list-style-type works, but whenever I try to get an image instead of the boring bullets, SharePoint deletes this part from the web part's html source (in-line or not).

So, has anyone faced this before?

  • 2
    don't know the specifics of your problem but sometimes it's better to have a linked file in CEWP and implement your css externally without the hassle of page edit, checkin-checkout, edits being removed, etc. Feb 28, 2019 at 16:28
  • Optionally you could give a try to a table layout. In the left column add the img and align it to top of the <td>.
    – SteffPoint
    Mar 1, 2019 at 9:34

1 Answer 1


I think teylyn said it best

this is a known issue, especially with wiki pages. Instead of entering html and JavaScript directly into the CEWP (using the HTML edit method), save the html and JavaScript in a text file. Upload that text file to a document library on the site (or the Style Library of the Site Collection, where the user will not be able to accidentally delete it). Then edit the CEWP and at the top of the settings panel enter the URL of the uploaded script file.

This method has the added benefit that you can use the same script on many pages. If you need to change the script, you only need to change it in one place.

Another benefit is that you can use version history in the library where the script file is saved, so you have much better control when developing new scripts.


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.