Forum Discussion
How to disable the second scrollbar on a modern sharepointpage with a list in it?
Are you using SharePoint default list web part on site page? Did you customize the list view using JSON formatting?
There is no way to change the "code" / functionality of SharePoint default list web part using out of the box capabilities.
However, you maybe able to customize list view using JSON formatting so that scroll bar will be removed from page. Check:
- Use view formatting to customize SharePoint
- SharePoint JSON view formatting samples - you can find different view samples here which might help you to get started with
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "hide-vertical-scrollbar"
}
Could you provide guidance on how to achieve this?
- ganeshsanapMar 28, 2024MVP
Can you share current JSON used for list view formatting?
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- SharepointnoobMar 28, 2024Copper ContributorOfcourse, here it is:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "hide-vertical-scrollbar",
"hideSelection": true,
"hideColumnHeader": true,
"rowFormatter": {
"elmType": "div",
"style": {
"display": "flex",
"padding": "5px",
"margin-bottom": "5px",
"margin-right": "100px",
"width": "90%"
},
"children": [
{
"elmType": "div",
"children": [
{
"elmType": "div",
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDark--hover"
},
"style": {
"display": "block",
"font-size": "18px",
"font-weight": "500",
"padding-bottom": "0px",
"padding-top": "0px",
"text-decoration": "none",
"text-overflow": "ellipsis",
"white-space": "normal"
},
"txtContent": "=[$Title]"
},
{
"elmType": "div",
"style": {
"font-size": "14px",
"white-space": "normal",
"overflow": "hidden",
"text-align": "left"
},
"txtContent": "=[$Description]"
}
]
}
]
}
}- ganeshsanapMar 28, 2024MVP
Sharepointnoob Can you try using this once?
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "hideSelection": true, "hideColumnHeader": true, "rowFormatter": { "elmType": "div", "style": { "display": "flex", "padding": "5px", "margin-bottom": "5px", "margin-right": "100px", "width": "90%", "overflow": "hidden" }, "children": [ { "elmType": "div", "children": [ { "elmType": "div", "attributes": { "class": "ms-fontColor-themePrimary ms-fontColor-themeDark--hover" }, "style": { "display": "block", "font-size": "18px", "font-weight": "500", "padding-bottom": "0px", "padding-top": "0px", "text-decoration": "none", "text-overflow": "ellipsis", "white-space": "normal" }, "txtContent": "=[$Title]" }, { "elmType": "div", "style": { "font-size": "14px", "white-space": "normal", "overflow": "hidden", "text-align": "left" }, "txtContent": "=[$Description]" } ] } ] } }
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.