I am currently working on a webpage, and I am struggling with Angular Material Card size and Angular Material Carousel size as well.
I've tried adding a lot of different properties to both of the elements, but nothing seems to do the trick here.
The card currently looks like this.
It looks horrible. I want the card to be smaller, the carousel to be smaller as well, and that the images fit the carousel, as for now, the images are shown cropped, as more than half of the picture can't be seen.
Any ideas how to fix this?
The code is the following:
<div fxLayout="row" fxLayoutAlign="start start" fxLayoutGap="15px">
<mat-card style= "width: fit-content;" class="results">
<mat-card-header>
<div mat-card-avatar class="example-header-image"></div>
<mat-card-title>{{myShowLodgment.Name}}</mat-card-title>
<mat-card-subtitle>Estrellas: {{myShowLodgment.NumberOfStars}}</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<mat-carousel [hideArrows]="false" [hideIndicators]="false" timings="200ms ease-in" [autoplay]="true"
interval="4000" color="white">
<mat-carousel-slide *ngFor="let slide of myShowLodgment.Photos" overlayColor="#ffffff" [hideOverlay]="false">
<img [src]="slide" alt="">
</mat-carousel-slide>
</mat-carousel>
<p>
<b>Descripción</b>: {{myShowLodgment.Description}}
<br>
<b>Dirección</b>: {{myShowLodgment.Address}}
<br>
<b>Precio por noche</b>: ${{myShowLodgment.PricePerNight}}
<br>
<b>Precio total</b>: ${{myShowLodgment.TotalPrice}}
</p>
<mat-card-actions>
<button *ngIf="canBook(myShowLodgment.IsFull)" mat-stroked-button color="primary" disabled>Alojamiento sin
capacidad!</button>
<button *ngIf="!canBook(myShowLodgment.IsFull)" mat-stroked-button color="primary"
(click)="submitBooking(myShowLodgment.Id)">Reservar!</button>
</mat-card-actions>
</mat-card-content>
</mat-card>
</div>
Thank you for your time, and any help is appreciated.