similar to the question mention How do I round the corners of my web part titles on my SharePoint site? [ How do I round corners of web part titles? ], I would like to see , the put a black outline border on my script editor / content editor web part, how to achieve the same ?

I used the https://www.w3schools.com/css/css_outline.asp link and its sample to outline for a paragraph, custom html. But here in my case, its a the list view web part itself and another script editor web part

2 Answers 2


Inspect page to get the content editor id then apply CSS for it:

   border: 1px solid red;

Refer here & here to understand better.

There is no way yet to identify CSS only for contenteditor webpart. this selector ms-rtestate-field is used to apply CSS for all webparts.


Here is a demo for your reference:

<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.3.min.js"></script>
<script type="text/javascript">           
    $(function () {
        //add outline to script editor webpart
        $(".s4-wpcell-plain.ms-webpartzone-cell.ms-webpart-cell-vertical.ms-fullWidth ").css("outline", "#ff9e0f solid 10px")

        //add outline to list web part
        $(".ms-webpartzone-cell.ms-webpart-cell-vertical.ms-fullWidth.s4-wpActive").css("outline", "#4CAF50 solid 10px");

Screenshot of result: Screenshot

Your Answer

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

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