How can I remove the white space on the left of this tiled web part to align with the script editor web part above? This problem occurs when the Chrome State is set to 'None'. If I change to 'Title Only' and modify the CSS as follows then it aligns correctly however as soon as I change to 'None' the CSS doesn't work:

**.ms-wpContentDivSpace {
    position: relative;
    margin-left: -10px;}**

enter image description here

1 Answer 1


You can look for the webpart id and use marging left on it for example

if this is the webpart html:

<div webpartid="632f770d-cf35-437a-8b24-4e3658e20329" haspers="false" id="WebPartWPQ6" width="100%" class="noindex " allowdelete="false" allowexport="false" style="position: relative; display: block; overflow: auto;"><span></span><span>

use webpart id

   margin-left: -10px;

This will work.

  • There is no WebPartWPQ reference, this is all I got: <div webpartid="dcc5f3d8-2e22-406c-bf33-83cb1ff8e4df" webpartid2="dc8e4702-de8f-436c-9c39-9d34e01a583f" haspers="false" id="WebPartctl00_ctl40_g_dc8e4702_de8f_436c_9c39_9d34e01a583f" width="100%" class="ms-WPBody noindex " allowremove="false" allowdelete="false" allowexport="false" style=""> and the ID code changes on each of the pages I have this web part on.
    – surfnode
    Apr 4, 2018 at 12:06
  • looks like you're trying to use a script editor webpart in that case use the id="WebPartctl00_ctl40_g_dc8e4702_de8f_436c_9c39_9d34e01a583f" to style the webpart #WebPartctl00_ctl40_g_dc8e4702_de8f_436c_9c39_9d34e01a583f { margin-left: -10px; }
    – sam
    Apr 4, 2018 at 23:57
  • So if Im using a custom CSS file, I will have to add in all the ID's for each script editor web part I want to change the code for? Is there any round this rather than using a Script Editor Web Part?
    – surfnode
    Apr 5, 2018 at 8:10
  • I tried doing this with a Content Editor web part but then it messes up the allignment for all other web parts on the site with the same WPQ2.
    – surfnode
    Apr 5, 2018 at 9:51

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.