Skip to content

Commit 9d48272

Browse files
fix(home.js): resolve image overflow causing scrollbar by adding Tailwind CSS to img tag
The issue of unwanted scrollbars appearing due to image overflow was fixed by applying Tailwind CSS classes ( max-h-[90vh] )to the <img> tag and removed 'h-auto' class because it was not required. The change will cause image to resize according to the available space and will not overflow due to different aspect ratio of screen.
1 parent d856731 commit 9d48272

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/pages/Home.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const Home = () => {
7979
)}
8080
</div>
8181
<div className="h-full bg-secondary w-2/4 sm:flex hidden items-center justify-center px-4">
82-
<img src="/landing page image.jpg" className="h-auto rounded-full w-auto object-cover" />
82+
<img src="/landing page image.jpg" className="max-h-[90vh] rounded-full w-auto object-cover" />
8383
</div>
8484
</div>
8585
</div>

0 commit comments

Comments
 (0)