ナビゲーションバーを画面の中央に配置したいと思っています。ナビゲーションバーのために私はリストを作成しました。私はリンクを失うよりも、テーブル要素を使ってみました。私の目標は、ロゴの下にナビゲーションバーを配置することだけです。私のナビゲーションバーの中心を作成する
font-size: 48px;
}
.img {
text-align: center;
}
.table {
\t /*display: table; Allow the centering to work */
\t margin: 0 auto;
}
ul#horizontal-list {
\t min-width: 100%;
\t list-style: none;
\t padding-top: 20px;
\t }
\t ul#horizontal-list li {
\t \t display: inline;
\t }
.logo {
/* top: 200px;*/
position: relative;
text-align: center;
}
ul {
\t float: center;
position: relative;
text-align: center;
/*margin-left: auto;
margin-right: auto;*/
list-style-type: none;
margin: 0;
padding: 0;
/* overflow: hidden;*/
background-color: white;
z-index: -2;
}
li {
float: left;
border-top:3px solid #C5908E;
border-bottom:3px solid #C5908E;
padding: 5px;
}
li:first-child {
border-left: 3px solid #C5908E;
}
li:last-child {
border-right: 3px solid #C5908E;
}
/*to change font */
li a {
\t text-align: center;
display: inline;
color: #484846;
font-size: 30px;
font-family: 'Poiret One', cursive;
padding: 5px ;
text-decoration: none;
}
.links a:link {color:#484846; background-color:transparent; text-decoration:none}
.links a:visited {color:#484846; background-color:transparent; text-decoration:none}
.links a:hover {color:#C5908E; background-color:transparent; text-decoration:none}
.links a:active {color:#484846; background-color:transparent; text-decoration:none}
.wrapper {
/*padding: 20px;*/
text-align: center;
}
</style>
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Poiret+One" rel="stylesheet">
<style>
@font-face {
font-family: 'Poiret One', cursive;
<div class= "title">
</div>
\t <title>
\t Kristin Fincken
\t </title>
</div>
</head>
<body>
\t
</div>
<div class="wrapper">
<br>
<div class="logo">
<img src="images/logo.png" usemap="#rec">
</div>
</div>
<br>
<br>
<br>
<div class ="links" >
<div class="table">
<ul id="horizontal-list">
<li><a href="html/design.html" >Design </a></li>
<li><a href="html/photo.html"> Photo </a></li>
<li><a href="html/web.html">Web</a></li>
<li><a href="html/word.html">Words</a></li>
</font>
</ul>
</div>
</div>
</body>
</html>
のためにあなたのコードを検証する必要があります。 –
ヘルプを受けたい場合はスニペットを修正してください。 –