I'm fairly new to using JSON and I'm trying to create a Gallery view to use with dynamic filtering. I have the view working the way I want, but I can't get the width and height of the 'card' to be what I want.
The width of my card is fine, but the height is too tall. If I change the height in the JSON, the width of the card get smaller.
In the image you can see all of the space below the text that I want to get rid of.
Here's my JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
"height": "150",
"width": "600",
"hideSelection": false,
"formatter": {
"elmType": "div",
"style": {
"display": "flex",
"align-items": "stretch",
"margin-bottom": "16px",
"flex-grow": "1",
"justify-content": "space-around",
"padding": "5px"
},
"children": [
{
"elmType": "div",
"style": {
"width": "100%",
"height": "100%",
"flex-wrap": "wrap",
"display": "flex",
"box-sizing": "border-box",
"padding": "4px 8px 5px 8px",
"border-radius": "2px"
},
"attributes": {
"class": "ms-bgColor-neutralLighterAlt"
},
"children": [
{
"elmType": "div",
"style": {
"text-align": "left"
},
"children": [
{
"elmType": "div",
"style": {
"color": "#333333",
"font-size": "16px",
"font-weight": "600",
"margin-bottom": "5px"
},
"txtContent": "[$Title]"
}
]
}
]
}
]
}
}
Any help or tips are greatly appreciated!