Forum Discussion
SharePoint Online Classic - Increase size of promoted link tiles to 275px using CSS
Hi Vanessa are you referring to not showing the title and title box at all until the user hovers over the title so you only see the icon? Or something else?
- Vanessa MartinApr 22, 2018Brass Contributor
Hi Joel,
That's it exactly. I am still learning the right terminology.
If you are viewing the tile, you see the title only.
If you hover over the tile, you then see the title and description.
Thanks.
- Vanessa MartinApr 22, 2018Brass Contributor
My latest attempt:
<style type="text/css">
/* tile row height */
.ms-promlink-body {
height: 285px;
width: 870px;
}/* tile dimensions, including space between tiles */
.ms-tileview-tile-root {
width: 285px !important;
height: 285px !important;
}/* tile overlay dimensions */
.ms-tileview-tile-content {
width: 275px !important;
height: 275px !important;
}/* title and description overlay dimensions */
div.ms-tileview-tile-detailsBox {
width: 275px !important;
height: 275px !important;
}/* tile background image dimensions */
.ms-tileview-tile-content > a > img {
width: 275px !important;
height: 275px !important;
}/* image dimensions */
.ms-tileview-tile-content img {
width:275px !important;
height:275px !important;
}/* title and description text */
.ms-tileview-tile-detailsListMedium {
background-color: rgba(0, 0, 0, 0.3);
height: 275px;
padding: 4px 7px 7px;
font-size: 14px;
line-height: 17px;
top: 40px !important;
}/* description text class */
.ms-tileview-tile-descriptionMedium {
padding-top: 15px;
font-size: 14px;
}/* title text when description not shown */
.ms-tileview-tile-titleTextMediumCollapsed {
background-color: rgba(0, 0, 0, 0.3);
width: 275px;
height: 40px;
position: absolute;
top: 130px;
left: 0px;
padding: 4px 7px;
font-size: 14px;
line-height: 17px;
}.ms-tileview-tile-titleMediumCollapsed {
height: 200px;
overflow: hidden;
vertical-align: bottom;
top: 200px !important;
}</style>
Yields an additional background/layer between the title and the image when just viewing the tile:
- Joel HillApr 22, 2018Brass Contributor
Here is some code I used a while back. I want to say if you set ul.ms-tileview-tile-detailsListMedium to 0px in the below, it will do what you are looking for. I dropped all of the code in case you want other ideas/ notes, especially the text centering. Promoted links has a lot of layers to it.
<style type="text/css">
.ms-promlink-header {DISPLAY: none !important}
/* tile row height */
div.ms-promlink-body {
height: 100px;
}/* tile dimensions, including inter-tile margin */
div.ms-tileview-tile-root {
width: 110px !important;
height: 110px !important;
}/* tile and title( + description) overlay dimensions */
div.ms-tileview-tile-content, div.ms-tileview-tile-detailsBox {
width: 100px !important;
height: 100px !important;
background-color: rgb(63,68,68);
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border-radius: 7px;}
/* tile background image dimensions */
div.ms-tileview-tile-content > a > div > img {
max-width: 50%;
width: 50% !important;
position: relative;
top:9px;
margin:auto;
}/* title and description text */
ul.ms-tileview-tile-detailsListMedium {
height: 100px;
font-size: 11px;
line-height: 100%;
text-align: center;
margin:auto;
}/* description text class */
li.ms-tileview-tile-descriptionMedium {
padding-top: 10px;
font-size: 11px;
}/* title text when description not shown */
div.ms-tileview-tile-titleTextMediumCollapsed {
background-color: rgba(0, 0, 0, 0.6);
width: 86px;
height: 29px;
position: absolute;
top: -33px;
left: 0px;
padding: 4px 7px 0px;
font-size: 11px;
line-height: 13px;
}
.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;
}
</style>