ページを伸ばしずに自分のリンクh1をセンタリングすることができないようです。私はテキストの整列を使用してそれを中心にする方法を知っています:センター、そしてそれは中心に、リンクはページの全幅を伸ばしています。ページを伸ばすことなく、私のヘッダーリンクを中央に設定する
リンクを伸ばしずにセンターリングできますか?
.navigation {
\t padding-top: 70px;
\t padding-bottom: 70px;
\t position: relative;
\t text-transform: uppercase;
\t
}
.brand-text {
font-family: 'Permanent Marker', cursive;
\t font-size: 50px;
\t color: black;
\t -webkit-transition: color 1000ms ease;
\t text-align: center;
\t margin-bottom: 20px;
\t margin-left: 0;
\t margin-right: 0;
\t margin-top: 0;
padding: 0;
display: block;
}
.brand-text:hover {
\t color: grey;
\t
}
.nav-brand {
\t text-decoration:none;
}
.nav-menu {
\t text-align: center;
}
.nav-link {
\t padding-top: 7px;
\t padding-bottom: 7px;
\t margin-right: 20px;
\t margin-left: 20px;
\t text-decoration: none;
\t color: grey;
\t font-family: 'Raleway', sans-serif;
\t -webkit-transition: color 700ms ease;
\t position: relative;
}
.nav-link:hover {
\t color: black;
}
.current {
color: black;
}
.current:hover {
color:
}
<!DOCTYPE html>
<html>
<head>
\t <title>Josh Corbett</title>
\t <meta charset="UTF-8">
\t <link rel="stylesheet" type="text/css" href="stylesheet.css">
\t <link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Permanent+Marker" rel="stylesheet">
</head>
<body>
\t <div class="navigation">
\t \t <a class="nav-brand" href="#"><h1 class="brand-text">Title</h1></a>
\t \t <div class="container">
\t \t \t <nav class="nav-menu" role="navigation">
\t \t \t \t <a class="nav-link current" href="#">Portfolio</a>
\t \t \t \t <a class="nav-link" href="#">About</a>
\t \t \t \t <a class="nav-link" href="#">Contact</a>
\t \t \t \t <a class="nav-link" href="#">Blog</a>
\t \t \t </nav>
\t \t </div>
\t </div>
</body>
の下に、あなたは、延伸により何を意味するかについて、より詳しく説明してもらえますか?ページの外観はどうなっていますか?あなたが持っているものが望ましくないことは、どのように分かりますか? – Xufox
注文を逆にして、リンクをh1に入れます。 – CBroe