Grid with Sidebar

Grid with Sidebar

Medium CSS Grid Layout 26 views
Explanation Complexity

Problem Statement

Create a two column layout with a fixed sidebar using grid.

Input Format

No input.

Output Format

Print the HTML+CSS code in one block.

Constraints

Use grid-template-columns: 220px 1fr.

Input / Output Format

Input Format
No input.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use grid-template-columns: 220px 1fr.

Examples

Input:
Output:
(HTML+CSS code)

Example Solution (Public)

CSS
<!doctype html>
<html lang='en'>
<head>
  <meta charset='utf-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <title>meetcode</title>
  <style>
    .layout { display: grid; grid-template-columns: 220px 1fr; gap: 12px; }
    aside, main { border: 1px solid #eee; border-radius: 12px; padding: 12px; }
  </style>
</head>
<body>
  <div class='layout'>
    <aside>Menu</aside>
    <main>meetcode content</main>
  </div>
</body>
</html>

Official Solution Code

<!doctype html>
<html lang='en'>
<head>
  <meta charset='utf-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <title>meetcode</title>
  <style>
    .layout { display: grid; grid-template-columns: 220px 1fr; gap: 12px; }
    aside, main { border: 1px solid #eee; border-radius: 12px; padding: 12px; }
  </style>
</head>
<body>
  <div class='layout'>
    <aside>Menu</aside>
    <main>meetcode content</main>
  </div>
</body>
</html>
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.