Generate a responsive grid layout using CSS Grid and Flexbox for a portfolio website.
I'll create a responsive grid layout using CSS Grid and Flexbox for a portfolio website. This layout will be responsive and adapt to different screen sizes. I'll create a main grid container with a header, main content area (which will contain project cards), and a footer.
This layout creates a responsive portfolio website with the following features:
Overall page structure using CSS Grid:
min-h-screen grid grid-rows-[auto_1fr_auto]
class on the main container creates a full-height layout with three rows: header, main content, and footer.Header:
flex justify-between items-center
) for layout.Main Content:
grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6
.Project Cards:
flex flex-col
) to ensure consistent height.Image
component for optimization.Footer:
Responsiveness:
This layout provides a solid foundation for a portfolio website. You can easily customize it further by adding more sections, changing colors, or adjusting the grid layout to fit your specific needs.