Skip to main content

Flexbox Page 2c/3r

grid-fixed-3c4r
.container {
display: flex;
flex-direction: column;
min-height: 100vh;
}

.header {
flex-shrink: 0;
background-color: #333;
color: #fff;
padding: 20px;
}

.main {
display: flex;
flex-grow: 1;
padding: 20px;
}

.leftColumn {
flex-shrink: 0;
width: 200px;
background-color: #eee;
padding: 20px;
}

.rightColumn {
flex-grow: 1;
background-color: #f9f9f9;
padding: 20px;
}

.footer {
flex-shrink: 0;
background-color: #333;
color: #fff;
padding: 20px;
}

@media (max-width: 768px) {
.leftColumn {
width: 20px;
}
}
import React from 'react';
import styles from './PageLayout.module.css';

interface PageLayoutProps {
children: React.ReactNode;
}

const PageLayout = ({ children }: PageLayoutProps) => {
return (
<div className={styles.container}>
<div className={styles.header}>Header</div>
<div className={styles.main}>
<div className={styles.leftColumn}>Left Column</div>
<div className={styles.rightColumn}>{children}</div>
</div>
<div className={styles.footer}>Footer</div>
</div>
);
};

export default PageLayout;