<div class="webpartDivBody" style="margin-bottom:-20px;">
<WebPartPages:ScriptEditorWebPart runat="server" .....></WebPartPages:ScriptEditorWebPart>

This code works for admin accounts. And looks terrible cause of the margin-bottom.

But for the other normal users, it doesn't work. So it looks fine.

When I remove margin-bottom:-20px, for admin accounts it looks fine.

But it looks bad for the other normal users.

So how can I make this style looks same with all user accounts? I just don't want to use margin-bottom. I think the reason is depends on the WebPart. Because other divs without Webpart don't need anything like that. Thank you.

Here is the orginal Webpart:

<WebPartPages:ScriptEditorWebPart runat="server" Content="
&lt;table width=&quot;270px&quot; height=&quot;80px&quot; &gt;
&lt;td&gt;&lt;a href=&quot;http://www.tcmb.gov.tr/kurlar/today.xml&quot;&gt;&lt;img style=&quot;height:35px;&quot; src=&quot;/SiteAssets/dolar.png&quot; alt=&quot;&quot;/&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td style=&quot;font-size:10px;text-float:left&quot; &gt;ABD DOLARI (Alış)&lt;/td&gt;&lt;td&gt;&lt;IFRAME marginWidth=0 marginHeight=0 src=&quot;http://ahapp/kurlar.aspx?Q=USD&quot; frameBorder=0 width=62 scrolling=no height=13 &gt;&lt;/IFRAME&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://www.tcmb.gov.tr/kurlar/today.xml&quot;&gt;&lt;img style=&quot;height:35px;&quot;  src=&quot;/SiteAssets/euro.png&quot; alt=&quot;&quot;/&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td style=&quot;font-size:10px;text-float:left&quot;&gt;EURO (Alış)&lt;/td&gt;&lt;td&gt;&lt;IFRAME marginWidth=0 marginHeight=0 src=&quot;http://ahapp/kurlar.aspx?Q=EUR&quot; frameBorder=0 width=62 scrolling=no height=13&gt;&lt;/iframe&gt;&lt;/td&gt;
&lt;/table&gt;" Title="Script Editor" Description="Allows authors to insert HTML snippets or scripts." ChromeType="None" ID="g_9dbf023f_ed28_4cdf_ad7d_e6609120ddfa" __MarkupType="vsattributemarkup" __WebPartId="{CBDD0DA1-FFF3-4332-BBB8-7B089CCD1881}" WebPart="true" __designer:IsClosed="false"></WebPartPages:ScriptEditorWebPart>
  • Are all pages checked in as major versions and approved? – Eric Alexander Aug 13 '13 at 19:40
  • It's at the home page. And there is no check in option. – e.ozmen Aug 14 '13 at 5:31
<div class="webpartDivBody" style="margin-bottom:-20px;">

is nothing SharePoint specific and doesn't care about user roles. If the resulting web page looks different for two guys, the typical reason is that they are not using the same web browser (type or version), e.g. A uses IE9.xxx,, B uses IE10.xyz and C uses Firefox 21.y. It's quite possible they all see slight or sometimes larger differences, because browser manufacturers unfortunately implemented some details differently (sometimes even simply wrong).

| improve this answer | |
  • No, I test at the same browser. I log out one user and login another one. – e.ozmen Aug 13 '13 at 13:56
  • Okay, then it can be either different user dependent browser settings, or the HTML generated on the server is different in the relevant places. (For the latter, you might want to save a copy of the page once for each of the two users, put it in a diff viewer, to see where the difference is created, and check in your SharePoint pages later where this section is created, and why it's different for these users.) – PeterB Aug 14 '13 at 10:36
  • Do you mean the same thing with @Dave Paylor ? – e.ozmen Aug 14 '13 at 12:18

If it looks different for both users when you change the CSS then it is working for both of them. It sounds like you have something else that only applies to admins which is having an impact.

| improve this answer | |
  • What or where should I look for a reason deeply? – e.ozmen Aug 13 '13 at 9:38
  • Hard to tell without seeing it but easiest way would probably to have a normal user and admin side by side so you can compare using developer tools or firebug or similar. – Dave Paylor Aug 13 '13 at 11:55
  • There is just typical permission differences. Not anything specific – e.ozmen Aug 14 '13 at 12:17

Are you using IE? Do you have compatibility view turned on as another user but not as admin? If so, it will look differently. Check to make sure that compatibility view is on for all users & admin or turned off for all users & admin. Alternatively, you can force IE to render the pages at its highest version by using an IE meta tag like so:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
| improve this answer | |
  • I did that but didn't work. – e.ozmen Aug 14 '13 at 5:28

I am late to the game, but experienced the same thing. My Style Library folder had unique permissions. Those with limited permissions such as Restricted Read and View were not loading the style-sheet. I asked the client to perform F12 keystroke and use the select element to view a specific div style. The custom css was not loading for these clients at all and didn't appear in the right pane. I upped permissions for auth users and it fixed the issue. I hope it helps somebody.

| improve this answer | |

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.