question

luiscolon0 avatar image
0 Votes"
luiscolon0 asked MichaelHan-MSFT answered

SharePoint 2013 page layout problem with width adjustment when zoom in/out or diff client views - CSS is not applying

Hello community,

Please, i have a problem with a page layout and the page itself... I have created some page layouts and some pages using the new layouts and added a call to the CSS that auto adjust the size of the content to 100%.

My problem is when creating a new page and adding some images in the RichImageFields and set the width to 100% in the ribbon (SharePoint page editor) and saving the page, it applies a specific width and overwrrites the CSS linked. Even adding a Script Editor webpart and appliying the CSS to ".img, .ms-rtestate-field, .column with important¡" doesn't fix the problem.

When adjusting the width via editor, this overwrrites the CSS, the width is added by sharepoint and i cannot delete it from editor.
135058-5.png
Tried using Script Editor, but no luck.
134999-6.png
Layout code:
135034-7.png
Page Image overlap (phone view):
134917-2.png
Desktop overlap, zoom in:
135048-3.png

Can be this achieved by some way? JS?

Appreciate your help.
Regards,
LC.

office-sharepoint-server-developmentsharepoint-devoffice-sharepoint-server-itpro
5.png (50.2 KiB)
6.png (4.5 KiB)
7.png (61.7 KiB)
2.png (151.8 KiB)
3.png (1.1 MiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MichaelHan-MSFT avatar image
0 Votes"
MichaelHan-MSFT answered

Hi @luiscolon0,
Try to use the below css instead:

 .ms-rtestate-field>img{
     width: 100% !important;
 }



If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.