The excess white space on the right side is a result of this specific styling:
<div class="gm-style-iw-d" style="overflow: scroll; max-height: 508px;">
^^^^^^^^^^^^^^^^
Essentially, this causes the browser to always show scrollbars, even if there's no content overflow.
To address this, you should switch it to overflow: auto
:
:host ::ng-deep .gm-style-iw-d {
overflow: auto !important;
}
Another issue arises here:
<div class="gm-style-iw gm-style-iw-c" style="padding-right: 0px; padding-bottom: 0px;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This snippet removes the right paddings. It's recommended to retain them as they were initially (12px
):
:host ::ng-deep .gm-style-iw-c {
padding-right: 12px !important;
padding-bottom: 12px !important;
}
The final step involves removing the fixed width from your cards:
<div class="card" style="width: 18rem;">
^^^^^^^^^^^^^
remove this
This change will allow the cards to default to 100% width.
Customized Stackblitz
https://i.sstatic.net/NHopk.png