Skip to content

Commit e44869c

Browse files
committed
Fix PR comment: Add css to style for the size of image
Bug: CMS-47074
1 parent 0c25a19 commit e44869c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

samples/nextjs-template/src/app/globals.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,16 @@ a:hover span.animate {
411411
background-image: linear-gradient(180deg, #10141d 55.03%, #191e28 100%);
412412
}
413413

414+
.about-us .about-us-image {
415+
position: relative;
416+
width: 100%;
417+
padding-top: 56.25%;
418+
}
419+
420+
.about-us .about-us-image img {
421+
object-fit: cover;
422+
}
423+
414424
.blog-card {
415425
color: #333;
416426
cursor: pointer;

samples/nextjs-template/src/components/AboutUs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function AboutUs({ opti }: AboutUsProps) {
3838
<section className="about-us">
3939
{opti?.image?.url?.default && (
4040
<div className="about-us-image">
41-
<Image src={src(opti.image.url.default)} alt="" width={500} height={500}/>
41+
<Image src={src(opti.image.url.default)} alt="" fill={true}/>
4242
</div>
4343
)}
4444
<h2>{opti.heading}</h2>

0 commit comments

Comments
 (0)