0

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. – Tiago Duarte Feb 28 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 at 9:34
0

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.

source

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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