前提・実現したいこと
ブラウザに、align-itemsとjust-content:space-betweenが適用されるように表示したいです
該当のソースコード
HTML
1<!DOCTYPE html> 2<html lang="ja"> 3<head> 4 <meta charset="UTF-8"> 5<link rel="stylesheet" type="text/css" href="style.css"> 6 <title>模写</title> 7</head> 8<body> 9<header class="page-header"> 10 <h1 class="page-header__logo"> 11 <img alt="sample"> 12 </h1> 13 <div class="page-header__info page-header-info"> 14 <div class="page-header-info__txt"> 15 <span>TEL 08073773</span> 16 <span> 受付時間 平日8時〜14時</span> 17 <a class="page-header-info__btn" href="#contact">お問合せ</a> 18</div> 19 20</header> 21 22<main class="main-content"> 23 メインコンテンツ 24<div class="main-visual"> 25 メインビジュアル 26<section class="intro-section"> 27 イントロセクション 28<div class="intro-section__header section-header" > 29ヘッダー 30</div> 31 32<nav class="intro-section__nav"> 33ナビゲーション 34</nav> 35 36<div class="intro-section__content"> 37コンテンツ 38</div> 39 40<div class="intro-section__contact"> 41<div class="contact-block"> 42お問合せ 43</div> 44</div> 45</section> 46</main> 47 48<footer class="page-footer"> 49</footer> 50 </body> 51 </html> 52 53
CSS
1body{ 2 font-size: 1.8rem; 3 text-align: center; 4} 5 6.page-header, 7.page-footer, 8.main-content{ 9 margin:30px,0; 10 border:5px solid red; 11} 12.main-visual, 13.intro-section{ 14 margin:30px,0; 15 border:5px solid green; 16} 17 18.intro-section__header, 19.intro-section__nav, 20.intro-section__content, 21.intro-section__contact{ 22 margin:30px,0; 23 border:5px solid blue; 24} 25 26.page-header{ 27 display:flex; 28 align-items:center; 29 justify-content:space-between; 30} 31.page-header__info{ 32 display:flex; 33 align-items:center; 34 justify-content:space-between; 35} 36.page-header-info__txt span{ 37 display:block; 38}
試したこと
インターネット、SNSで検索。
補足情報(FW/ツールのバージョンなど)
使用している物
PC:Mac
ブラウザ:Safari
回答2件
あなたの回答
tips
プレビュー