今回はヘッダーのCSS(スタイルシート)を書いていきます。 この記事のポイント ヘッダーをデザイン案と同じ表示になるように整える floatプロパティを使ってレイアウトを調整する ヘッダーのCSSをコーディングする 前回はリセットCSS「reset.css」と、フォントの指定を「style.css」に書いてきました。 ここまではCSSをコーディングする前準備でした。 今回はヘッダー部分のCSSを作成していきます。 ヘッダーとフッターはトップページ以外のページでも表示するため、1度コーディングしたら全てのページで使うことができます。 もしCSSについての基礎を復習したい方は「CSS(スタイルシート)の基礎」をご覧ください。 ヘッダーの幅と左右の余白を設定する まずはヘッダーの横幅と余白、そして背景色を指定していきます。 ヘッダーの横幅と左右の余白 左右の余白を自動で均一にするために、ここで新