Forum Discussion

Tammy Bruns's avatar
Tammy Bruns
Copper Contributor
Dec 31, 2018
Solved

Sharepoint Help Needed with Snippet Script

I have two webparts on one page. I have a script (see below) that formats webpart #1 exactly how I want it. I want webpart #2 to be formatted the same way. What do I need to change to get both webparts formatted the same as webpart #1?? Thank you for your help!!

 

<style type="text/css">
#promotedlinksbody_WPQ3 div.ms-tileview-tile-root {
margin-right:40px !important;
}
.ms-promlink-root > .ms-promlink-header { display: none; }
.ms-promlink-root .ms-promlink-body { width: 800px; height: auto; }
.ms-tileview-tile-detailsListMedium {
font-weight: bold;
height: 0px;
padding: 0px 0px 0px;
font-size: 0px;
line-height: 0px;
}
.ms-tileview-tile-detailsBox{

background-color: transparent;
}
</style>

  • The snippet below will needs to be applied for the new webpart zone the #promotedlinksbody_WPQ3 is the ID of WebPart #1.  copy/paste the snippet then change the #promotedlinksbody_WPQ3 to the ID of webpart #2, this can be found by inspecting the element through browser tools.

     

    Or you could remove the #promotedlinksbody_WPQ3 and see if it applies to both.

     

    #promotedlinksbody_WPQ3 div.ms-tileview-tile-root {
    margin-right:40px !important;
    }

  • NotAlex's avatar
    NotAlex
    Iron Contributor

    The snippet below will needs to be applied for the new webpart zone the #promotedlinksbody_WPQ3 is the ID of WebPart #1.  copy/paste the snippet then change the #promotedlinksbody_WPQ3 to the ID of webpart #2, this can be found by inspecting the element through browser tools.

     

    Or you could remove the #promotedlinksbody_WPQ3 and see if it applies to both.

     

    #promotedlinksbody_WPQ3 div.ms-tileview-tile-root {
    margin-right:40px !important;
    }

Resources