Forum Discussion
SharePoint Webpart view Keeps Changing Based on Screen Resolution
Hi Thomas Berman,
I have inseted a script editor, and have the following codes inside:
<style type="text/css">
/*display promoted links in 3 rows of 5 items*/
.ms-promlink-body {
width: 800px;
height: 100px;
}
/*display rows of items by width*/
.ms-promlink-body {
width: 100%;
}
/*hide the arrows when you have more items than viewable*/
.ms-promlink-header{
display:none;
}
/* title and description text */
ul.ms-tileview-tile-detailsListMedium {
font-size: 13.5px;
}
.ms-tileview-tile-titleMedium,
.ms-tileview-tile-titleMediumCollapsed,
.ms-tileview-tile-titleMediumExpanded,
.ms-tileview-tile-titleSmall,
.ms-tileview-tile-titleSmallCollapsed,
.ms-tileview-tile-titleSmallExpanded,
.ms-tileview-tile-descriptionMedium {
display: block;
text-align: center;
}
.ms-tileview-tile-detailsBox{
background-color:rgba( 0,0,0,0.35);
}
</style>
I have 15 promoted link tiles, and would like to view them constantly in three rows of 5. Currently, the view of the promoted links changes depending on the screen resoultion which I am viewing my SP site in. For example, when I am viewing my screen at 100%, the layout of the tiles changes to 3 rows of 4, and the remaining 3 tiles underneath it.
Without testing your CSS, I see you have a hard-coded pixel width on the web part body. Can you try playing around with that to be a proportional unit like percent/em/rem/vw? That's the first place I would start.
- eyeana14Sep 04, 2019Copper Contributor
I have just played around with the codes below, changing the px with %,em,rem,vw:
.ms-promlink-body {
width: 800px;
height: 100px;
}However it still does not achieve the output. SP displays the tiles in 3 rows of 5 when page is viewed at 90%.