diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/absolute/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/absolute/index.html
deleted file mode 100644
index 78451cc5e..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/absolute/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- Title
-
-
-
- box1
- box2
- box3
- box4
- box5
- box6
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/absolute/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/absolute/style.css
deleted file mode 100644
index 09c085e5f..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/absolute/style.css
+++ /dev/null
@@ -1,38 +0,0 @@
-.box1 {
- background-color: lightcoral;
- width: 200px;
- height: 200px;
-}
-
-.box2 {
- position: absolute;
- top: 50px;
- left: 50px;
- background-color: lightblue;
- width: 200px;
- height: 200px;
-}
-
-.box3 {
- background-color: lightgreen;
- width: 200px;
- height: 200px;
-}
-
-.box4 {
- background-color: lightseagreen;
- width: 200px;
- height: 200px;
-}
-
-.box5 {
- background-color: lightskyblue;
- width: 200px;
- height: 200px;
-}
-
-.box6 {
- background-color: lightgoldenrodyellow;
- width: 200px;
- height: 200px;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/box-model/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/box-model/index.html
deleted file mode 100644
index e0b365dad..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/box-model/index.html
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
- Title
-
-
-
- Foo
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/box-model/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/box-model/style.css
deleted file mode 100644
index e6751f10e..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/box-model/style.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.box {
- margin: 30px;
- padding: 30px;
- border: 10px solid #aaa;
- border-radius: 10px;
- box-shadow: 0px 0px 2px 1px #aaa;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/display/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/display/index.html
deleted file mode 100644
index 3219e9bab..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/display/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- Title
-
-
-
- box1
- box2
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/display/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/display/style.css
deleted file mode 100644
index 65f3f5173..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/display/style.css
+++ /dev/null
@@ -1,9 +0,0 @@
-.box1 {
- background-color: lightcoral;
- display: inline;
-}
-
-.box2 {
- background-color: lightblue;
- display: block;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/exercise/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/exercise/index.html
deleted file mode 100644
index f61060347..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/exercise/index.html
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
- 課題
-
-
-
-
-
-
-
-
Basic
-
$5
-
-
- - 基本的な機能が使用可能
- - 8GB のクラウドストレージが利用可能
-
-
-
-
Premium
-
$20
-
-
- - 全ての機能が使用可能
- - 無制限のクラウドストレージが利用可能
-
-
-
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/exercise/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/exercise/style.css
deleted file mode 100644
index 70c9076da..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/exercise/style.css
+++ /dev/null
@@ -1,61 +0,0 @@
-body {
- background-color: #eee;
-}
-
-#container {
- display: flex;
- justify-content: center;
-}
-
-.plan {
- display: flex;
- flex-direction: column;
- flex: 1;
- margin: 20px;
- padding: 15px 25px;
- border: 1px solid #bbb;
- border-radius: 5px;
- background-color: #fff;
- box-shadow: 0 0 5px #ccc;
-}
-
-h1 {
- font-size: 1.5em;
-}
-
-.price {
- margin-bottom: 10px;
- font-weight: bold;
- font-size: 36px;
- color: #000;
-}
-
-#container h1 {
- margin: 10px 0;
- font-weight: normal;
-}
-
-.button {
- align-self: flex-start;
- margin: 10px 0px;
- padding: 10px 40px;
- border: 1px solid #0af;
- border-radius: 5px;
- background-color: #0af;
- color: #fff;
- font-size: 1em;
-}
-
-ul {
- padding: 0 0 0 20px;
-}
-
-#container button:hover {
- background-color: #0cf;
-}
-
-@media (max-width: 1024px) {
- #container {
- display: block;
- }
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/fixed/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/fixed/index.html
deleted file mode 100644
index 78451cc5e..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/fixed/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- Title
-
-
-
- box1
- box2
- box3
- box4
- box5
- box6
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/fixed/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/fixed/style.css
deleted file mode 100644
index 589f633df..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/fixed/style.css
+++ /dev/null
@@ -1,38 +0,0 @@
-.box1 {
- background-color: lightcoral;
- width: 200px;
- height: 200px;
-}
-
-.box2 {
- position: fixed;
- top: 50px;
- left: 50px;
- background-color: lightblue;
- width: 200px;
- height: 200px;
-}
-
-.box3 {
- background-color: lightgreen;
- width: 200px;
- height: 200px;
-}
-
-.box4 {
- background-color: lightseagreen;
- width: 200px;
- height: 200px;
-}
-
-.box5 {
- background-color: lightskyblue;
- width: 200px;
- height: 200px;
-}
-
-.box6 {
- background-color: lightgoldenrodyellow;
- width: 200px;
- height: 200px;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/flex/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/flex/index.html
deleted file mode 100644
index 826e12394..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/flex/index.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- Title
-
-
-
-
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/flex/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/flex/style.css
deleted file mode 100644
index 57e9cf79b..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/flex/style.css
+++ /dev/null
@@ -1,21 +0,0 @@
-.wrapper {
- display: flex;
-}
-
-.box1 {
- background-color: lightcoral;
- width: 100px;
- height: 100px;
-}
-
-.box2 {
- background-color: lightblue;
- width: 100px;
- height: 100px;
-}
-
-.box3 {
- background-color: lightgreen;
- width: 100px;
- height: 100px;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/grid/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/grid/index.html
deleted file mode 100644
index 59b7ea7c1..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/grid/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- Title
-
-
-
-
-
box1
-
box2
-
box3
-
box4
-
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/grid/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/grid/style.css
deleted file mode 100644
index acc1d49f0..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/grid/style.css
+++ /dev/null
@@ -1,25 +0,0 @@
-.wrapper {
- display: grid;
- grid-template-columns: 100px 100px 100px;
- grid-template-rows: 100px 100px;
-}
-
-.box1 {
- background-color: lightcoral;
-}
-
-.box2 {
- background-color: lightblue;
-}
-
-.box3 {
- grid-column: 3 / 4;
- grid-row: 1 / 3;
- background-color: lightgreen;
-}
-
-.box4 {
- grid-column: 1 / 3;
- grid-row: 2 / 3;
- background-color: lightseagreen;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/max-min-width/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/max-min-width/index.html
deleted file mode 100644
index f78bf737d..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/max-min-width/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- Title
-
-
-
- box1
- box2
- box3
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/max-min-width/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/max-min-width/style.css
deleted file mode 100644
index 316a88014..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/max-min-width/style.css
+++ /dev/null
@@ -1,16 +0,0 @@
-.box1 {
- background-color: lightcoral;
- width: 80%;
- max-width: 800px;
-}
-
-.box2 {
- background-color: lightblue;
- width: 80%;
- min-width: 500px;
-}
-
-.box3 {
- background-color: lightgreen;
- width: 80%;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/media-query/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/media-query/index.html
deleted file mode 100644
index 0661835c2..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/media-query/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
- Title
-
-
-
- box1
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/media-query/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/media-query/style.css
deleted file mode 100644
index 984f80543..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/media-query/style.css
+++ /dev/null
@@ -1,9 +0,0 @@
-.box1 {
- background-color: lightcoral;
-}
-
-@media (max-width: 800px) {
- .box1 {
- background-color: lightblue;
- }
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/percent/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/percent/index.html
deleted file mode 100644
index 0e1ea1b29..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/percent/index.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- Title
-
-
-
- box1
- box2
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/percent/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/percent/style.css
deleted file mode 100644
index ce03fa250..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/percent/style.css
+++ /dev/null
@@ -1,9 +0,0 @@
-.box1 {
- background-color: lightcoral;
- width: 50%;
-}
-
-.box2 {
- background-color: lightblue;
- width: 700px;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/relative-absolute/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/relative-absolute/index.html
deleted file mode 100644
index 70bb6704c..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/relative-absolute/index.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- Title
-
-
-
-
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/relative-absolute/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/relative-absolute/style.css
deleted file mode 100644
index 9d8c3573b..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/relative-absolute/style.css
+++ /dev/null
@@ -1,16 +0,0 @@
-.box1 {
- position: relative;
- margin-left: 200px;
- width: 400px;
- height: 400px;
- background-color: lightcoral;
-}
-
-.box2 {
- position: absolute;
- right: 50px;
- bottom: 50px;
- width: 200px;
- height: 200px;
- background-color: lightblue;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/relative/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/relative/index.html
deleted file mode 100644
index 78451cc5e..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/relative/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
- Title
-
-
-
- box1
- box2
- box3
- box4
- box5
- box6
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/relative/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/relative/style.css
deleted file mode 100644
index ce9b0206b..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/relative/style.css
+++ /dev/null
@@ -1,38 +0,0 @@
-.box1 {
- background-color: lightcoral;
- width: 200px;
- height: 200px;
-}
-
-.box2 {
- position: relative;
- top: 50px;
- left: 50px;
- background-color: lightblue;
- width: 200px;
- height: 200px;
-}
-
-.box3 {
- background-color: lightgreen;
- width: 200px;
- height: 200px;
-}
-
-.box4 {
- background-color: lightseagreen;
- width: 200px;
- height: 200px;
-}
-
-.box5 {
- background-color: lightskyblue;
- width: 200px;
- height: 200px;
-}
-
-.box6 {
- background-color: lightgoldenrodyellow;
- width: 200px;
- height: 200px;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/space-around/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/space-around/index.html
deleted file mode 100644
index 826e12394..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/space-around/index.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- Title
-
-
-
-
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/space-around/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/space-around/style.css
deleted file mode 100644
index f948edb78..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/space-around/style.css
+++ /dev/null
@@ -1,22 +0,0 @@
-.wrapper {
- display: flex;
- justify-content: space-around;
-}
-
-.box1 {
- background-color: lightcoral;
- width: 100px;
- height: 100px;
-}
-
-.box2 {
- background-color: lightblue;
- width: 100px;
- height: 100px;
-}
-
-.box3 {
- background-color: lightgreen;
- width: 100px;
- height: 100px;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/three-div/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/three-div/index.html
deleted file mode 100644
index f78bf737d..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/three-div/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- Title
-
-
-
- box1
- box2
- box3
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/three-div/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/three-div/style.css
deleted file mode 100644
index 397980405..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/three-div/style.css
+++ /dev/null
@@ -1,11 +0,0 @@
-.box1 {
- background-color: lightcoral;
-}
-
-.box2 {
- background-color: lightblue;
-}
-
-.box3 {
- background-color: lightgreen;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/three-span/index.html b/docs/2-browser-apps/05-css-arrangement/_samples/three-span/index.html
deleted file mode 100644
index 01bc6bb82..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/three-span/index.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- Title
-
-
-
- box1
- box2
- box3
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/_samples/three-span/style.css b/docs/2-browser-apps/05-css-arrangement/_samples/three-span/style.css
deleted file mode 100644
index 397980405..000000000
--- a/docs/2-browser-apps/05-css-arrangement/_samples/three-span/style.css
+++ /dev/null
@@ -1,11 +0,0 @@
-.box1 {
- background-color: lightcoral;
-}
-
-.box2 {
- background-color: lightblue;
-}
-
-.box3 {
- background-color: lightgreen;
-}
diff --git a/docs/2-browser-apps/05-css-arrangement/devtool-boxmodel.png b/docs/2-browser-apps/05-css-arrangement/devtool-boxmodel.png
deleted file mode 100644
index e6049dd87..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/devtool-boxmodel.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/exercise-smartphone.png b/docs/2-browser-apps/05-css-arrangement/exercise-smartphone.png
deleted file mode 100644
index fb0e00c46..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/exercise-smartphone.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/exercise.png b/docs/2-browser-apps/05-css-arrangement/exercise.png
deleted file mode 100644
index 465f54ba3..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/exercise.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/flex.png b/docs/2-browser-apps/05-css-arrangement/flex.png
deleted file mode 100644
index c86b266a8..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/flex.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/grid-column-row.png b/docs/2-browser-apps/05-css-arrangement/grid-column-row.png
deleted file mode 100644
index dc66a5ce7..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/grid-column-row.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/grid.png b/docs/2-browser-apps/05-css-arrangement/grid.png
deleted file mode 100644
index ca7685936..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/grid.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/index.mdx b/docs/2-browser-apps/05-css-arrangement/index.mdx
deleted file mode 100644
index 8969bb3cb..000000000
--- a/docs/2-browser-apps/05-css-arrangement/index.mdx
+++ /dev/null
@@ -1,505 +0,0 @@
----
-title: CSSによる配置(発展)
----
-
-import absoluteScroll from "./position-absolute-scroll.mp4";
-import fixedScroll from "./position-fixed-scroll.mp4";
-import percentCss from "./percent-css.mp4";
-import maxMinWidth from "./max-width-min-width.mp4";
-import mediaQuery from "./mediaquery.mp4";
-
-## CSSのボックスモデル
-
-HTMLの要素はすべて、一定の高さと幅を持った四角形だと考えることができます。その四角形は
-
-- content(中身)
-- padding(中身と境界線の間の幅)
-- border(境界線)
-- margin(境界線の外側の余白)
-
-の4重構造になっています。
-
-[「CSS」のページの演習](https://learn.utcode.net/docs/trial-session/css/#%E8%AA%B2%E9%A1%8C-%E6%99%82%E9%96%93%E3%81%8C%E4%BD%99%E3%81%A3%E3%81%9F%E5%A0%B4%E5%90%88)を例に構造を見てみましょう(構造がわかりやすいよう、`border`を`10px`に変更しています)。
-
-```html title="index.html"
-
-
-
-
- Title
-
-
-
- Foo
-
-
-```
-
-```css title="style.css"
-.box {
- margin: 30px;
- padding: 30px;
- border: 10px solid #aaa;
- border-radius: 10px;
- box-shadow: 0px 0px 2px 1px #aaa;
-}
-```
-
-
-
-このページを開発者ツールを使って見てみましょう。
-
-
-4重に色分けされた構造が見えます。
-
-`content`は主に`width`や`height`などのプロパティを、`padding`, `border`, `margin`はそれぞれ主に`padding`, `border`, `margin`などのプロパティを操作することで制御できます。
-
-`width`, `height`, `padding`, `border`, `margin`の値を変えると開発者ツールの表示がどう変わるか試してみましょう。
-
-## ブロックレベル要素とインライン要素
-
-HTMLの要素は、ブロックレベル要素とインライン要素に分類されます。
-
-**ブロックレベル要素**は見出しや段落、表など、文章を構成する基本単位となる要素です。
-
-常に前後に改行が入り、可能なところまで(親要素いっぱいまで)左右に広がります。
-
-そのため、ブロックレベル要素を複数並べて書くと、上から下へと配置されていきます。
-
-ブロックレベル要素には`div`要素や`p`要素、`table`要素、`ul`要素などがあります。
-
-以下ではブロックレベル要素である`div`要素を3つ並べています。
-
-```html title="index.html"
-
- box1
- box2
- box3
-
-```
-
-```css title="style.css"
-.box1 {
- background-color: lightcoral;
-}
-
-.box2 {
- background-color: lightblue;
-}
-
-.box3 {
- background-color: lightgreen;
-}
-```
-
-
-
-
-
-**インライン要素**は文章の一部や表の要素など、ブロックレベル要素の内容となる要素です。
-
-前後に改行は伴わず、必要な幅だけを占有します。
-
-そのため、インライン要素を複数並べて書くと、左から右へと配置されていきます。
-
-インライン要素には`span`要素や`a`要素、`img`要素や`input`要素があります。
-
-以下ではインライン要素である`span`要素を3つ並べています。
-
-```html title="index.html"
-
- box1
- box2
- box3
-
-```
-
-
-
-
-
-ブロックレベル要素の中にはブロックレベル要素もインライン要素も配置することができますが、インライン要素の中にブロックレベル要素を配置することはできません。
-
-また、インライン要素の場合、`width`や`height`は適用されません。
-
-### 確認問題
-
-`display`プロパティを操作することで要素の挙動を変更することができます。
-
-上記のコードで、ブロックレベル要素である`div`要素に`display: inline`を、インライン要素である`span`要素に`display: block`を指定してみると表示はどう変わるか、試してみましょう。
-
-
-
-## フレックスボックス
-
-フレックスボックスを利用すると、要素を横や縦に並べたり、間隔を均等に取って並べたり、順番を指定して並べたりといった柔軟な配置を簡単に行うことができます。
-
-フレックスボックスを利用するには、配置したい要素の**親要素**に`display: flex`を適用します。
-
-以下のように、`box1`, `box2`, `box3`という3つの`div`要素が`wrapper`という`div`要素の中に並んでいる状態を考えましょう。
-
-```html title="index.html"
-
-
-
-```
-
-このままだとブロックレベル要素である`div`要素が並んでいるだけなので、`box1`, `box2`, `box3`は縦に並んで表示されます。
-
-
-
-`box1`, `box2`, `box3`の親要素である`wrapper`に`display: flex`を指定すると、要素は横並びに表示されます。
-
-```css title="style.css"
-.wrapper {
- display: flex;
-}
-```
-
-
-
-
-
-フレックスボックスを使用すると複雑な配置も簡単に実現できます。
-
-一つの例として、`justify-content: space-around`を`wrapper`に指定してみると、要素の周囲に同じだけの間隔が空きます。
-
-```css title="style.css"
-.wrapper {
- display: flex;
- justify-content: space-around;
-}
-```
-
-
-
-
-
-他にもたくさんの配置がフレックスボックスによって実現可能なので、調べてみましょう。
-
-## グリッド
-
-1次元で要素をレイアウトしていくフレックスボックスに対して、グリッドには行と列の2次元で要素をレイアウトする発想があります。
-
-グリッドを利用するには、配置したい要素の**親要素**に`display: grid`を適用し、`grid-template-columns`プロパティで列の幅を、`grid-template-rows`プロパティで行の幅を指定します。
-
-`grid-column`や`grid-row`を使うと、開始ラインや終了ラインを指定して項目を配置することができます。
-
-以下のコードを試してみましょう。
-
-```html title="index.html"
-
-
-
box1
-
box2
-
box3
-
box4
-
-
-```
-
-```css title="style.css"
-.wrapper {
- display: grid;
- grid-template-columns: 100px 100px 100px;
- grid-template-rows: 100px 100px;
-}
-
-.box1 {
- background-color: lightcoral;
-}
-
-.box2 {
- background-color: lightblue;
-}
-
-.box3 {
- grid-column: 3 / 4;
- grid-row: 1 / 3;
- background-color: lightgreen;
-}
-
-.box4 {
- grid-column: 1 / 3;
- grid-row: 2 / 3;
- background-color: lightseagreen;
-}
-```
-
-
-
-
-
-## position
-
-`position`プロパティを操作すると、要素の位置指定の基準を変更することができます。
-
-`position: static`: デフォルトの状態です。
-
-`position: relative`: 要素の本来の位置から相対的にどれだけずらすかを指定することができます。
-
-```html title="index.html"
-
- box1
- box2
- box3
- box4
- box5
- box6
-
-```
-
-```css title="style.css"
-.box2 {
- position: relative;
- top: 50px;
- left: 50px;
- width: 200px;
- height: 200px;
- background-color: lightblue;
-}
-```
-
-
-
-
-
-`position: absolute`: 周囲の要素を無視し、ページ内で絶対的にどの位置にあるかを指定することができます。
-
-上のコードの`position: relative`を`position: absolute`に変えてみましょう。
-
-```css title="style.css"
-.box2 {
- position: absolute;
- top: 50px;
- left: 50px;
- width: 200px;
- height: 200px;
- background-color: lightblue;
-}
-```
-
-
-
-
-
-`position: fixed`: `absolute`に似ていますが、画面をスクロールしても要素は同じ場所に留まります。
-
-上のコードの`position: relative`を`position: fixed`に変えてみましょう。
-
-```css title="style.css"
-.box2 {
- position: fixed;
- top: 50px;
- left: 50px;
- width: 200px;
- height: 200px;
- background-color: lightblue;
-}
-```
-
-
-
-以下のように、`absolute`の場合はスクロールすると`box2`も動いていきましたが、
-
-
-
-`fixed`の場合はスクロールしても`box2`は同じ場所に留まっています。
-
-
-
-### 親要素を基準にして子要素の位置を指定する
-
-`position`プロパティを使うと、親要素を基準にして子要素の位置を指定することができます。
-
-そのような場合、親要素に`relative`を、子要素に`absolute`を指定します。
-
-```html title="index.html"
-
-
-
-```
-
-```css title="style.css"
-.box1 {
- position: relative;
- width: 400px;
- height: 400px;
- background-color: lightcoral;
-}
-
-.box2 {
- position: absolute;
- right: 50px;
- bottom: 50px;
- width: 200px;
- height: 200px;
- background-color: lightblue;
-}
-```
-
-
-
-上のコードの`box1`に`margin-left: 200px`を指定して位置をずらしてみましょう。
-
-```css title="style.css"
-.box1 {
- position: relative;
- margin-left: 200px;
- width: 400px;
- height: 400px;
- background-color: lightcoral;
-}
-```
-
-
-
-`box1`の位置が変わっても、`box2`の`box1`に対する位置は変化していません。
-
-
-
-## レスポンシブデザイン
-
-デバイスの画面サイズに応じて適切なレイアウトで表示を行うデザインをレスポンシブデザインと呼びます。
-
-スマートフォン用、PC用などと個別のサイトを作らずとも、同一のCSSであらゆるデバイスに対応することができます。
-
-### メディアクエリ
-
-画面サイズによって異なるスタイルを適用させたい際にはメディアクエリを使います。
-
-スマートフォン等でもサイトをデバイス本来の画面サイズで表示するために、`head`要素の中に以下を記述しましょう。
-
-```html title="index.html"
-
-```
-
-メディアクエリの基本的な形は`@media (条件) {条件が真の場合に適用されるスタイル}`のようになります。
-
-以下の例を試してみましょう。
-
-```html title="index.html"
-
- box1
-
-```
-
-```css title="style.css"
-.box1 {
- background-color: lightcoral;
-}
-
-@media (max-width: 800px) {
- .box1 {
- background-color: lightblue;
- }
-}
-```
-
-
-
-ウインドウの幅を変えてみると要素はどのようになるか、試してみましょう。
-
-
-
-### パーセント指定
-
-長さの指定は、親要素に対する比率によって行うこともできます。
-
-以下の例を試してみましょう。
-
-```html title="index.html"
-
- box1
- box2
-
-```
-
-```css title="style.css"
-.box1 {
- background-color: lightcoral;
- width: 50%;
-}
-
-.box2 {
- background-color: lightblue;
- width: 700px;
-}
-```
-
-
-
-ウインドウの幅を変えてみると要素の幅はどのようになるか、試してみましょう。
-
-
-
-### `max-width`, `min-width`
-
-`max-width`, `min-width`を使うと、要素の幅の上限と下限を指定することができます。
-
-以下の例を試してみましょう。
-
-```html title="index.html"
-
- box1
- box2
- box3
-
-```
-
-```css title="style.css"
-.box1 {
- background-color: lightcoral;
- width: 80%;
- max-width: 800px;
-}
-
-.box2 {
- background-color: lightblue;
- width: 80%;
- min-width: 500px;
-}
-
-.box3 {
- background-color: lightgreen;
- width: 80%;
-}
-```
-
-
-
-ウインドウの幅を変えてみると要素の幅はどのようになるか、試してみましょう。
-
-
-
-## 演習問題
-
-これまでの知識を活用して、料金プランの説明をするページを作ってみましょう。
-
-
-スマホ等でも見やすく表示されるようにしてみましょう。
-
-
-### 参考: サンプルで使われているCSSプロパティの一覧
-
-- `display`
-- `flex-direction`
-- `justify-content`
-- `align-self`
-- `margin`
-- `padding`
-- `border`
-- `border-radius`
-- `box-shadow`
-- `background-color`
-- `color`
-- `font-weight`
-
-
diff --git a/docs/2-browser-apps/05-css-arrangement/max-width-min-width.mp4 b/docs/2-browser-apps/05-css-arrangement/max-width-min-width.mp4
deleted file mode 100644
index 22c4c084f..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/max-width-min-width.mp4 and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/mediaquery.mp4 b/docs/2-browser-apps/05-css-arrangement/mediaquery.mp4
deleted file mode 100644
index e089b4a53..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/mediaquery.mp4 and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/percent-css.mp4 b/docs/2-browser-apps/05-css-arrangement/percent-css.mp4
deleted file mode 100644
index beff00ba9..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/percent-css.mp4 and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/position-absolute-scroll.mp4 b/docs/2-browser-apps/05-css-arrangement/position-absolute-scroll.mp4
deleted file mode 100644
index d4b3cd38d..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/position-absolute-scroll.mp4 and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/position-absolute.png b/docs/2-browser-apps/05-css-arrangement/position-absolute.png
deleted file mode 100644
index 0ff753a22..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/position-absolute.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/position-fixed-scroll.mp4 b/docs/2-browser-apps/05-css-arrangement/position-fixed-scroll.mp4
deleted file mode 100644
index edf668ae6..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/position-fixed-scroll.mp4 and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/position-relative.png b/docs/2-browser-apps/05-css-arrangement/position-relative.png
deleted file mode 100644
index f8b533c62..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/position-relative.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/relative-absolute-after.png b/docs/2-browser-apps/05-css-arrangement/relative-absolute-after.png
deleted file mode 100644
index 9ca99d6ac..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/relative-absolute-after.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/relative-absolute-before.png b/docs/2-browser-apps/05-css-arrangement/relative-absolute-before.png
deleted file mode 100644
index df7ad8cb4..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/relative-absolute-before.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/space-around.png b/docs/2-browser-apps/05-css-arrangement/space-around.png
deleted file mode 100644
index ea124fcd7..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/space-around.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/three-blocks.png b/docs/2-browser-apps/05-css-arrangement/three-blocks.png
deleted file mode 100644
index c0b2e1efc..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/three-blocks.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/three-div.png b/docs/2-browser-apps/05-css-arrangement/three-div.png
deleted file mode 100644
index 04528c408..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/three-div.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-arrangement/three-span.png b/docs/2-browser-apps/05-css-arrangement/three-span.png
deleted file mode 100644
index 2619e5926..000000000
Binary files a/docs/2-browser-apps/05-css-arrangement/three-span.png and /dev/null differ
diff --git a/docs/2-browser-apps/05-css-layout/_samples/align-center/index.html b/docs/2-browser-apps/05-css-layout/_samples/align-center/index.html
new file mode 100644
index 000000000..d0597b094
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/align-center/index.html
@@ -0,0 +1,49 @@
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/align-center/style.css b/docs/2-browser-apps/05-css-layout/_samples/align-center/style.css
new file mode 100644
index 000000000..caf35cccc
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/align-center/style.css
@@ -0,0 +1,48 @@
+body {
+ background-color: #f0f0f0;
+}
+
+#container {
+ display: flex;
+ gap: 16px;
+ justify-content: center;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ padding: 24px;
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.detail {
+ color: #0d6efd;
+}
+
+.price {
+ font-size: 20px;
+ margin-top: 8px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+ margin-top: 16px;
+ padding: 8px;
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/border-radius/index.html b/docs/2-browser-apps/05-css-layout/_samples/border-radius/index.html
new file mode 100644
index 000000000..8f7de0011
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/border-radius/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
Basic
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
Premium
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/border-radius/style.css b/docs/2-browser-apps/05-css-layout/_samples/border-radius/style.css
new file mode 100644
index 000000000..4e2c806a7
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/border-radius/style.css
@@ -0,0 +1,28 @@
+body {
+ background-color: #f0f0f0;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.price {
+ font-size: 20px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/border/index.html b/docs/2-browser-apps/05-css-layout/_samples/border/index.html
new file mode 100644
index 000000000..8f7de0011
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/border/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
Basic
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
Premium
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/border/style.css b/docs/2-browser-apps/05-css-layout/_samples/border/style.css
new file mode 100644
index 000000000..b6950f721
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/border/style.css
@@ -0,0 +1,26 @@
+body {
+ background-color: #f0f0f0;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.price {
+ font-size: 20px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/flexbox-gap/index.html b/docs/2-browser-apps/05-css-layout/_samples/flexbox-gap/index.html
new file mode 100644
index 000000000..8f7de0011
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/flexbox-gap/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
Basic
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
Premium
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/flexbox-gap/style.css b/docs/2-browser-apps/05-css-layout/_samples/flexbox-gap/style.css
new file mode 100644
index 000000000..a2d37d8be
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/flexbox-gap/style.css
@@ -0,0 +1,37 @@
+body {
+ background-color: #f0f0f0;
+}
+
+#container {
+ display: flex;
+ gap: 16px;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ padding: 24px;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.price {
+ font-size: 20px;
+ margin-top: 8px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+ margin-top: 16px;
+ padding: 8px;
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/flexbox/index.html b/docs/2-browser-apps/05-css-layout/_samples/flexbox/index.html
new file mode 100644
index 000000000..8f7de0011
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/flexbox/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
Basic
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
Premium
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/flexbox/style.css b/docs/2-browser-apps/05-css-layout/_samples/flexbox/style.css
new file mode 100644
index 000000000..06c51f2e5
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/flexbox/style.css
@@ -0,0 +1,37 @@
+body {
+ background-color: #f0f0f0;
+}
+
+#container {
+ display: flex;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ margin: 8px;
+ padding: 24px;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.price {
+ font-size: 20px;
+ margin-top: 8px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+ margin-top: 16px;
+ padding: 8px;
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/justify-center/index.html b/docs/2-browser-apps/05-css-layout/_samples/justify-center/index.html
new file mode 100644
index 000000000..8f7de0011
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/justify-center/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
Basic
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
Premium
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/justify-center/style.css b/docs/2-browser-apps/05-css-layout/_samples/justify-center/style.css
new file mode 100644
index 000000000..6523cd420
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/justify-center/style.css
@@ -0,0 +1,38 @@
+body {
+ background-color: #f0f0f0;
+}
+
+#container {
+ display: flex;
+ gap: 16px;
+ justify-content: center;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ padding: 24px;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.price {
+ font-size: 20px;
+ margin-top: 8px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+ margin-top: 16px;
+ padding: 8px;
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/justify-space-between/index.html b/docs/2-browser-apps/05-css-layout/_samples/justify-space-between/index.html
new file mode 100644
index 000000000..d0597b094
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/justify-space-between/index.html
@@ -0,0 +1,49 @@
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/justify-space-between/style.css b/docs/2-browser-apps/05-css-layout/_samples/justify-space-between/style.css
new file mode 100644
index 000000000..67877de90
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/justify-space-between/style.css
@@ -0,0 +1,47 @@
+body {
+ background-color: #f0f0f0;
+}
+
+#container {
+ display: flex;
+ gap: 16px;
+ justify-content: center;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ padding: 24px;
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.detail {
+ color: #0d6efd;
+}
+
+.price {
+ font-size: 20px;
+ margin-top: 8px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+ margin-top: 16px;
+ padding: 8px;
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/margin-top/index.html b/docs/2-browser-apps/05-css-layout/_samples/margin-top/index.html
new file mode 100644
index 000000000..8f7de0011
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/margin-top/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
Basic
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
Premium
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/margin-top/style.css b/docs/2-browser-apps/05-css-layout/_samples/margin-top/style.css
new file mode 100644
index 000000000..d4f46ff83
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/margin-top/style.css
@@ -0,0 +1,31 @@
+body {
+ background-color: #f0f0f0;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ margin: 8px;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.price {
+ font-size: 20px;
+ margin-top: 8px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+ margin-top: 16px;
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/margin/index.html b/docs/2-browser-apps/05-css-layout/_samples/margin/index.html
new file mode 100644
index 000000000..8f7de0011
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/margin/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
Basic
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
Premium
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/margin/style.css b/docs/2-browser-apps/05-css-layout/_samples/margin/style.css
new file mode 100644
index 000000000..822161c71
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/margin/style.css
@@ -0,0 +1,29 @@
+body {
+ background-color: #f0f0f0;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ margin: 8px;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.price {
+ font-size: 20px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/media-query-align-center/index.html b/docs/2-browser-apps/05-css-layout/_samples/media-query-align-center/index.html
new file mode 100644
index 000000000..058a7807d
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/media-query-align-center/index.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/media-query-align-center/style.css b/docs/2-browser-apps/05-css-layout/_samples/media-query-align-center/style.css
new file mode 100644
index 000000000..b658ccb30
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/media-query-align-center/style.css
@@ -0,0 +1,55 @@
+body {
+ background-color: #f0f0f0;
+}
+
+#container {
+ display: flex;
+ gap: 16px;
+ justify-content: center;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ padding: 24px;
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.detail {
+ color: #0d6efd;
+}
+
+.price {
+ font-size: 20px;
+ margin-top: 8px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+ margin-top: 16px;
+ padding: 8px;
+}
+
+@media (max-width: 1024px) {
+ #container {
+ flex-direction: column;
+ align-items: center;
+ }
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/media-query/index.html b/docs/2-browser-apps/05-css-layout/_samples/media-query/index.html
new file mode 100644
index 000000000..058a7807d
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/media-query/index.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/media-query/style.css b/docs/2-browser-apps/05-css-layout/_samples/media-query/style.css
new file mode 100644
index 000000000..179d898e3
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/media-query/style.css
@@ -0,0 +1,54 @@
+body {
+ background-color: #f0f0f0;
+}
+
+#container {
+ display: flex;
+ gap: 16px;
+ justify-content: center;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ padding: 24px;
+}
+
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.detail {
+ color: #0d6efd;
+}
+
+.price {
+ font-size: 20px;
+ margin-top: 8px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+ margin-top: 16px;
+ padding: 8px;
+}
+
+@media (max-width: 1024px) {
+ #container {
+ flex-direction: column;
+ }
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/padding/index.html b/docs/2-browser-apps/05-css-layout/_samples/padding/index.html
new file mode 100644
index 000000000..8f7de0011
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/padding/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
Basic
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
Premium
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/padding/style.css b/docs/2-browser-apps/05-css-layout/_samples/padding/style.css
new file mode 100644
index 000000000..ccfe2e526
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/padding/style.css
@@ -0,0 +1,33 @@
+body {
+ background-color: #f0f0f0;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ margin: 8px;
+ padding: 24px;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.price {
+ font-size: 20px;
+ margin-top: 8px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+ margin-top: 16px;
+ padding: 8px;
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/responsive-header/index.html b/docs/2-browser-apps/05-css-layout/_samples/responsive-header/index.html
new file mode 100644
index 000000000..f1c33d3d2
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/responsive-header/index.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+ My Site
+
+
+
+
+
+
MySite
+
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/responsive-header/style.css b/docs/2-browser-apps/05-css-layout/_samples/responsive-header/style.css
new file mode 100644
index 000000000..15e306ff3
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/responsive-header/style.css
@@ -0,0 +1,58 @@
+body {
+ margin: 0;
+ background-color: #fff;
+}
+
+header ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+#menu a {
+ text-decoration: none;
+ color: #777;
+ font-size: 14px;
+}
+
+#logo {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+#hamburger {
+ display: none;
+ width: 40px;
+ height: 40px;
+ border: none;
+ background: none;
+ padding: 0;
+ cursor: pointer;
+}
+
+header {
+ background-color: #fff;
+ border-bottom: 1px solid #eee;
+}
+
+.container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 16px 24px;
+}
+
+#menu {
+ display: flex;
+ gap: 32px;
+}
+
+@media (max-width: 768px) {
+ #hamburger {
+ display: flex;
+ }
+
+ nav {
+ display: none;
+ }
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/width-percent/index.html b/docs/2-browser-apps/05-css-layout/_samples/width-percent/index.html
new file mode 100644
index 000000000..8f7de0011
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/width-percent/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
Basic
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
Premium
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/width-percent/style.css b/docs/2-browser-apps/05-css-layout/_samples/width-percent/style.css
new file mode 100644
index 000000000..de12e4ac7
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/width-percent/style.css
@@ -0,0 +1,24 @@
+body {
+ background-color: #f0f0f0;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.price {
+ font-size: 20px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+}
diff --git a/docs/2-browser-apps/05-css-layout/_samples/width/index.html b/docs/2-browser-apps/05-css-layout/_samples/width/index.html
new file mode 100644
index 000000000..8f7de0011
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/width/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
Basic
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
Premium
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/_samples/width/style.css b/docs/2-browser-apps/05-css-layout/_samples/width/style.css
new file mode 100644
index 000000000..748e234a2
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/_samples/width/style.css
@@ -0,0 +1,23 @@
+body {
+ background-color: #f0f0f0;
+}
+
+.card {
+ background-color: #fff;
+ width: 240px;
+}
+
+.plan {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+.price {
+ font-size: 20px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+}
diff --git a/docs/2-browser-apps/05-css-layout/align-center-card.png b/docs/2-browser-apps/05-css-layout/align-center-card.png
new file mode 100644
index 000000000..23c910985
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/align-center-card.png differ
diff --git a/docs/2-browser-apps/05-css-layout/before-width-card.png b/docs/2-browser-apps/05-css-layout/before-width-card.png
new file mode 100644
index 000000000..8a08c3299
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/before-width-card.png differ
diff --git a/docs/2-browser-apps/05-css-layout/border-card.png b/docs/2-browser-apps/05-css-layout/border-card.png
new file mode 100644
index 000000000..fd99936e0
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/border-card.png differ
diff --git a/docs/2-browser-apps/05-css-layout/border-radius-card.png b/docs/2-browser-apps/05-css-layout/border-radius-card.png
new file mode 100644
index 000000000..d7c47a14e
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/border-radius-card.png differ
diff --git a/docs/2-browser-apps/05-css-layout/flex-column-cards.png b/docs/2-browser-apps/05-css-layout/flex-column-cards.png
new file mode 100644
index 000000000..48886777e
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/flex-column-cards.png differ
diff --git a/docs/2-browser-apps/05-css-layout/flexbox-cards.png b/docs/2-browser-apps/05-css-layout/flexbox-cards.png
new file mode 100644
index 000000000..b3e0ddb24
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/flexbox-cards.png differ
diff --git a/docs/2-browser-apps/05-css-layout/hamburger.svg b/docs/2-browser-apps/05-css-layout/hamburger.svg
new file mode 100644
index 000000000..5e03e7586
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/hamburger.svg
@@ -0,0 +1,10 @@
+
diff --git a/docs/2-browser-apps/05-css-layout/index.mdx b/docs/2-browser-apps/05-css-layout/index.mdx
new file mode 100644
index 000000000..029cf5ac5
--- /dev/null
+++ b/docs/2-browser-apps/05-css-layout/index.mdx
@@ -0,0 +1,645 @@
+---
+title: CSSによるレイアウト
+---
+
+import responsiveCardsVideo from "./responsive-cards.mp4";
+import responsiveCenterCardsVideo from "./responsive-center-cards.mp4";
+import responsiveHeaderVideo from "./responsive-header.mp4";
+
+この節では、CSSを使用してHTML要素のレイアウトを調整する方法を学びます。
+
+例として、次のような料金プランを表すカードを作ることを目標に進めていきます。
+
+
+
+まずは、HTMLとCSSで料金プランのカードを作り始めてみます。
+
+```html title="index.html"
+
+
+
+
+ 料金プラン
+
+
+
+
+
+
+
Basic
+
$5
+
+
+ - 基本的な機能
+ - AIアシスタントのサポート
+ - 5GBのストレージ
+
+
+
+
Premium
+
$20
+
+
+ - 全ての機能
+ - AIアシスタントのサポート
+ - 20GBのストレージ
+
+
+
+
+
+```
+
+```css title="style.css"
+body {
+ background-color: #f0f0f0;
+}
+
+.card {
+ background-color: #fff;
+}
+
+.plan {
+ font-weight: bold; /* 太字にする */
+ font-size: 24px;
+}
+
+.price {
+ font-size: 20px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+}
+```
+
+:::tip[16進数カラーコード]
+`#f0f0f0`や`#0d6efd`のように、6桁の英数字で色を指定する記法を16進数カラーコードと呼びます。左から順に2桁ずつが、それぞれ赤・緑・青の成分を16進数で表しています。
+
+また、省略形として3桁で指定することもできます。例えば、`#1da`は`#11ddaa`と同じ意味になります。
+:::
+
+## 幅と高さ
+
+今のところ、カードの幅が画面いっぱいに広がってしまっています。
+
+
+
+`width`プロパティで要素の幅を設定することができます。カードに適切な幅を設定するには、次のようにします。
+
+```css
+.card {
+ background-color: #fff;
+ // highlight-next-line
+ width: 240px;
+}
+```
+
+
+
+なお、`width`プロパティで幅を設定したのと同様に、高さを設定したい場合は`height`プロパティを使うことができます。
+
+
+
+`width`プロパティや`height`プロパティの値には、親要素などに占める割合を表すパーセント値を指定することもできます。ボタンの幅がその親要素であるカードいっぱいに広がるようにするには、次のようにします。
+
+```css
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ // highlight-next-line
+ width: 100%;
+}
+```
+
+
+
+
+
+:::tip[ブロック要素とインライン要素]
+
+HTML要素は、それらが表示される際のデフォルトの振る舞いにおいて分類することができます。
+
+`div`や`h1`、`p`などの要素は一般にブロック要素と呼ばれます。これらは新しい行から始まり、`width`プロパティや`height`プロパティが設定できます。`width`プロパティを設定しない場合は親要素いっぱいに広がります。
+
+`span`や`a`、`strong`などの要素は一般にインライン要素と呼ばれます。これらは新しい行から始まらず、`width`プロパティや`height`プロパティも設定できず、内容に応じた幅・高さになります。
+:::
+
+## ボーダー
+
+`border`プロパティを使って、ボーダーと呼ばれる境界線を設定することができます。次の例では、カードにボーダーを追加しています。
+
+```css
+.card {
+ background-color: #fff;
+ width: 240px;
+ // highlight-next-line
+ border: 1px solid #bbb;
+}
+```
+
+`border`プロパティに3つの値を指定する場合、それらの値はボーダーの幅・種類・色を表します。
+
+また、`border`プロパティに`none`を指定するとボーダーは表示されなくなります。次の例では、ボタンに付いていたデフォルトのボーダーを消しています。
+
+```css
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ // highlight-next-line
+ border: none;
+}
+```
+
+
+
+
+
+`border-radius`プロパティで角を丸めることができます。指定する値は半径の大きさです。次の例では、カードの角とボタンの角を丸くしています。
+
+```css
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ // highlight-next-line
+ border-radius: 8px;
+}
+```
+
+```css
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ // highlight-next-line
+ border-radius: 8px;
+}
+```
+
+
+
+
+
+## マージン
+
+`margin`プロパティを使って、マージンと呼ばれる余白を設定することができます。マージンはボーダーの外側の余白です。次の例では、カードの外側に適切なマージンを設定しています。
+
+```css
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ // highlight-next-line
+ margin: 8px;
+}
+```
+
+
+
+
+
+上下左右の全てではなく、特定の方向のみにマージンを設定したい場合はどうでしょうか。
+
+上側だけにマージンを設定したい場合は、`margin-top`プロパティを使用します。次の例では、価格表示の上側とボタンの上側にマージンを設定しています。
+
+```css
+.price {
+ font-size: 20px;
+ // highlight-next-line
+ margin-top: 8px;
+}
+
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+ // highlight-next-line
+ margin-top: 16px;
+}
+```
+
+
+
+
+
+同様に、`margin-bottom`, `margin-left`, `margin-right`プロパティを使用すると、それぞれ下側・左側・右側のみにマージンを設定することができます。
+
+`margin`のみならず、`padding`や`border`などについても同様です。
+
+## パディング
+
+`padding`プロパティを使って、パディングと呼ばれる余白を設定することができます。パディングはボーダーの内側の余白です。
+
+次の例では、カードの内側とボタンの内側にパディングを設定しています。
+
+```css
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ margin: 8px;
+ // highlight-next-line
+ padding: 24px;
+}
+```
+
+```css
+.button {
+ background-color: #0d6efd;
+ color: #fff;
+ font-size: 16px;
+ width: 100%;
+ border: none;
+ border-radius: 8px;
+ margin-top: 16px;
+ // highlight-next-line
+ padding: 8px;
+}
+```
+
+
+
+
+
+## フレックスボックス
+
+現在は3枚のカードが縦に並んでいますが、これを横に並ぶようにすることを考えます。
+
+フレックスボックスを使用すると、要素を柔軟にレイアウトすることができます。フレックスボックスを使用するには、レイアウトしたい要素の親要素の`display`プロパティに`flex`を指定します。フレックスボックスでレイアウトされた要素は、デフォルトで横並びになります。
+
+次の例では、カードの親要素の`display`プロパティに`flex`を指定し、カードが横並びになるようにしています。
+
+```css
+// highlight-start
+#container {
+ display: flex;
+}
+// highlight-end
+```
+
+
+
+
+
+これまでは、カードどうしの間隔を空けるために各カードにマージンを設定していました。しかし、フレックスボックスを使う場合は、この目的により適した`gap`プロパティを利用できます。`gap`プロパティは、子要素であるカード側ではなく、親要素のコンテナ側で設定します。このプロパティを使うと、要素と要素の間にのみ間隔が作られ、端の要素の外側には余白がつきません。
+
+次の例では、カードの`margin`プロパティを削除し、親要素に`gap`プロパティを指定しています。
+
+```css
+.card {
+ background-color: #fff;
+ width: 240px;
+ border: 1px solid #bbb;
+ border-radius: 8px;
+ // highlight-next-line
+ /* margin: 8px; を削除 */
+ padding: 24px;
+}
+```
+
+```css
+#container {
+ display: flex;
+ // highlight-next-line
+ gap: 16px;
+}
+```
+
+
+
+### `flex-direction`プロパティ
+
+フレックスボックスによるレイアウトの方向を変更するには、`flex-direction`プロパティを使用します。`row`を指定すれば水平に、`column`を指定すれば垂直にレイアウトされます。
+
+先ほど、`display: flex;`を指定しただけでカードが横並びになったのは、このプロパティのデフォルト値が`row`であるためです。
+
+実際に親要素の`flex-direction`プロパティを`column`に指定すると、カードが縦に並ぶことが確認できます。
+
+
+
+### `justify-content`プロパティ
+
+フレックスボックスでは、`justify-content`プロパティを使うことで、`flex-direction`プロパティで指定した方向のレイアウトを制御することができます。
+
+次の例では、`justify-content`プロパティを`center`に指定することで、カードを水平方向の中央に配置しています。
+
+```css
+#container {
+ display: flex;
+ gap: 16px;
+ // highlight-next-line
+ justify-content: center;
+}
+```
+
+
+
+
+
+他のレイアウト方法も試してみましょう。
+
+準備として、カードのプラン名の横に「詳細」のリンクを設置します。`Free
`のようになっていた部分を次のように変更し、リンクにはボタンと同じ色を適用します。
+
+```html
+
+```
+
+```css
+// highlight-start
+.detail {
+ color: #0d6efd;
+}
+// highlight-end
+```
+
+次の例では、`justify-content`プロパティを`space-between`に指定することで、プラン名とリンクを水平方向の両端に配置しています。
+
+```css
+// highlight-start
+.card-header {
+ display: flex;
+ justify-content: space-between;
+}
+// highlight-end
+```
+
+
+
+
+
+### `align-items`プロパティ
+
+`align-items`プロパティを使うことで、`flex-direction`プロパティで指定した方向と交差する方向のレイアウトを制御できます。
+
+次の例では、`align-items`プロパティを`center`に指定することで、プラン名とリンクを垂直方向の中央に配置しています。
+
+```css
+.card-header {
+ display: flex;
+ justify-content: space-between;
+ // highlight-next-line
+ align-items: center;
+}
+```
+
+
+
+
+
+## レスポンシブデザイン
+
+先ほどはフレックスボックスを使ってカードを横並びにすることができましたが、スマートフォンのような画面の幅が狭い端末では、カードを縦に並べた方が見やすくなります。そこで、画面の幅が一定より小さい場合は、カードが縦並びになるようにしていきましょう。
+
+このように、さまざまな画面サイズの端末に対応するデザイン手法はレスポンシブデザインと呼ばれます。
+
+レスポンシブデザインを行っていく準備として、HTMLの`head`要素内に次の`meta`要素を記述し、スマートフォンなどの端末でも本来の画面サイズで表示が行われるようにしましょう。
+
+```html title="index.htmlのhead要素内"
+
+```
+
+レスポンシブデザインを実現するための仕組みとして、メディアクエリがあります。メディアクエリを使用すると、画面の幅などの条件によって適用するCSSを切り替えることができます。次のような構文で記述します。
+
+```css
+@media (条件) {
+ /* 条件が真の場合に適用されるスタイル */
+}
+```
+
+`条件`の部分には、例えば「画面幅が800px以下の場合」としたいならば`max-width: 800px`のように指定します。
+
+メディアクエリを使って、画面幅が一定より小さい場合に`flex-direction`プロパティの値が`column`となるようにすることで、カードを縦並びにすることができます。
+
+```css
+// highlight-start
+@media (max-width: 1024px) {
+ #container {
+ flex-direction: column;
+ }
+}
+// highlight-end
+```
+
+
+
+
+
+縦並びになった場合も、カードが左右中央に表示されるようにしましょう。
+
+この際は、`flex-direction`プロパティの値が`column`となり垂直方向にレイアウトされているため、水平方向のレイアウトを制御するためには`justify-content`プロパティではなく`align-items`プロパティを使用する必要があります。
+
+次の例では、`align-items`プロパティを`center`に指定することで、カードを水平方向の中央に配置しています。
+
+```css
+@media (max-width: 1024px) {
+ #container {
+ flex-direction: column;
+ // highlight-next-line
+ align-items: center;
+ }
+}
+```
+
+
+
+
+
+## 演習問題
+
+CSSを使って、次のようなウェブサイトのヘッダーを作成しましょう。
+
+
+
+- 画面幅が広い場合は、ナビゲーションメニューが表示されます。
+- 画面幅が狭い場合は、ナビゲーションメニューの代わりにハンバーガーアイコンが表示されるようにします。
+
+HTMLは次のものを使用してください。
+
+```html title="index.html"
+
+
+
+
+
+ My Site
+
+
+
+
+
+
MySite
+
+
+
+
+
+
+```
+
+CSSは次のものをベースに、必要な箇所を記述してください。
+
+```css title="style.css"
+body {
+ margin: 0;
+ background-color: #fff;
+}
+
+header ul {
+ margin: 0;
+ padding: 0;
+ list-style: none; /* リストのマーカー(•など)を非表示にする */
+}
+
+#menu a {
+ text-decoration: none; /* リンクの下線を消す */
+ color: #777;
+ font-size: 14px;
+}
+
+#logo {
+ font-weight: bold; /* 太字にする */
+ font-size: 24px;
+}
+
+#hamburger {
+ display: none;
+ width: 40px;
+ height: 40px;
+ border: none;
+ background: none;
+ padding: 0;
+ cursor: pointer; /* マウスカーソルをポインタにする */
+}
+
+/* ここから下を変更してください。 */
+
+header {
+ background-color: #fff;
+ /* ここで適切な境界線を設定する */
+}
+
+.container {
+ display: flex;
+ /* ここで適切なレイアウトを設定する */
+}
+
+#menu {
+ display: flex;
+ /* ここで適切なレイアウトを設定する */
+}
+
+@media (max-width: 768px) {
+ #hamburger {
+ display: flex;
+ }
+ /* ここで適切な設定を行う */
+}
+```
+
+:::tip
+
+`display`プロパティに`none`を指定すると、要素が表示されなくなります。
+
+:::
+
+
+
+```css title="style.css"
+body {
+ margin: 0;
+ background-color: #fff;
+}
+
+header ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+#menu a {
+ text-decoration: none;
+ color: #777;
+ font-size: 14px;
+}
+
+#logo {
+ font-weight: bold;
+ font-size: 24px;
+}
+
+#hamburger {
+ display: none;
+ width: 40px;
+ height: 40px;
+ border: none;
+ background: none;
+ padding: 0;
+ cursor: pointer;
+}
+
+header {
+ background-color: #fff;
+ border-bottom: 1px solid #eee;
+}
+
+.container {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 16px 24px;
+}
+
+#menu {
+ display: flex;
+ gap: 32px;
+}
+
+@media (max-width: 768px) {
+ #hamburger {
+ display: flex;
+ }
+
+ nav {
+ display: none;
+ }
+}
+```
+
+
+
+
diff --git a/docs/2-browser-apps/05-css-layout/justify-center-cards.png b/docs/2-browser-apps/05-css-layout/justify-center-cards.png
new file mode 100644
index 000000000..546419b7d
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/justify-center-cards.png differ
diff --git a/docs/2-browser-apps/05-css-layout/justify-space-between-card-header.png b/docs/2-browser-apps/05-css-layout/justify-space-between-card-header.png
new file mode 100644
index 000000000..8c93f1172
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/justify-space-between-card-header.png differ
diff --git a/docs/2-browser-apps/05-css-layout/margin-card.png b/docs/2-browser-apps/05-css-layout/margin-card.png
new file mode 100644
index 000000000..2eeef99a1
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/margin-card.png differ
diff --git a/docs/2-browser-apps/05-css-layout/margin-top-card.png b/docs/2-browser-apps/05-css-layout/margin-top-card.png
new file mode 100644
index 000000000..3619e87a7
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/margin-top-card.png differ
diff --git a/docs/2-browser-apps/05-css-layout/padding-card.png b/docs/2-browser-apps/05-css-layout/padding-card.png
new file mode 100644
index 000000000..c0db4d117
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/padding-card.png differ
diff --git a/docs/2-browser-apps/05-css-layout/pricing-cards-final.png b/docs/2-browser-apps/05-css-layout/pricing-cards-final.png
new file mode 100644
index 000000000..3dde2cd8d
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/pricing-cards-final.png differ
diff --git a/docs/2-browser-apps/05-css-layout/responsive-cards.mp4 b/docs/2-browser-apps/05-css-layout/responsive-cards.mp4
new file mode 100644
index 000000000..d9f6913f0
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/responsive-cards.mp4 differ
diff --git a/docs/2-browser-apps/05-css-layout/responsive-center-cards.mp4 b/docs/2-browser-apps/05-css-layout/responsive-center-cards.mp4
new file mode 100644
index 000000000..edc32c2dc
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/responsive-center-cards.mp4 differ
diff --git a/docs/2-browser-apps/05-css-layout/responsive-header.mp4 b/docs/2-browser-apps/05-css-layout/responsive-header.mp4
new file mode 100644
index 000000000..8da560ef9
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/responsive-header.mp4 differ
diff --git a/docs/2-browser-apps/05-css-layout/width-card.png b/docs/2-browser-apps/05-css-layout/width-card.png
new file mode 100644
index 000000000..aa5afcf99
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/width-card.png differ
diff --git a/docs/2-browser-apps/05-css-layout/width-full-card.png b/docs/2-browser-apps/05-css-layout/width-full-card.png
new file mode 100644
index 000000000..14d67ad90
Binary files /dev/null and b/docs/2-browser-apps/05-css-layout/width-full-card.png differ