htmlとcssの始めたてなのですが一番最後の header li + li { margin-left: 16px; } がうまく機能しません。原因を教えてください。
htmlとcssの始めたてなのですが一番最後の header li + li { margin-left: 16px; } がうまく機能しません。原因を教えてください。 <!DOCTYPE html> <html lang="ja"> <html lang="ja"> <head> <meta charset="utf-8"> <title>Profile</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="shortcut icon" href="img/favicon.ico"> <link rel="stylesheet" href="https://unpkg.com/ress/dist/ress.min.css"> <link rel="stylesheet" href="css/style.css"> </head> <body> <div class="container"> <header> <h1> <a href="idex.html"><img src="img/logo.svg" alt="Profile"></a> </h1> <nav> <ul> <il> <a href="#">About</a> </il> <il> <a href="#">Biycle</a> </il> </ul> </nav> </header> </div> </body> </html> css html{ font-size: 100%; } body { color: #383e45; font-size: 0.9rem; } li { list-style: none; } a { text-decoration: none; } .container { max-width: 100%; width: 960px; outline: 1px solid red; padding: 0 4%; } ul { line-height: 0%; } li { display:block; } /* header */ header { display: flex; justify-content: space-between; align-items: center; } header img { width: 120px; vertical-align: bottom; } header ul { display: flex; } header li a { color: #24292e; } header li + li { margin-left: 16px; }
HTML、CSS・14閲覧