I'm attempting to include padding on the right side of a horizontal scroll so that the last item in the scroll appears in the center of the screen.
Here's what I have tried so far. While the left padding works perfectly, I'm puzzled as to why the right padding isn't being applied:
.option-widget {
display: flex !important;
overflow: auto;
padding-left: 40% !important;
padding-right: 40% !important;
}
HTML :
<div className="option-widget">
<IconButton id={selected} className="icon-font" ><img style={{ width: '70px' }} src={image.selected} alt="name" /> </IconButton>
<IconButton id={selected} className="icon-font" ><img style={{ width: '70px' }} src={image.selected} alt="name" /> </IconButton>
<IconButton id={selected} className="icon-font" ><img style={{ width: '70px' }} src={image.selected} alt="name" /> </IconButton>
<IconButton id={selected} className="icon-font" ><img style={{ width: '70px' }} src={image.selected} alt="name" /> </IconButton>
<IconButton id={selected} className="icon-font" ><img style={{ width: '70px' }} src={image.selected} alt="name" /> </IconButton>
<IconButton id={selected} className="icon-font" ><img style={{ width: '70px' }} src={image.selected} alt="name" /> </IconButton>
</div>
Any assistance would be greatly appreciated.