【发布时间】:2018-02-01 11:40:01
【问题描述】:
这是我的代码(我在 html 中完全是菜鸟)这段代码在导航的顶部和左侧给了我空白...你们知道我做错了什么吗?
div.nav {
background-color: black;
color: white;
font-size: 20px;
font-weight: bold;
position: fixed;
width: 100%;
text-align: center;
}
ul {
}
li {
display: inline-block;
list-style: none;
}
li a {
padding: 15px;
color: white;
}
<div class="nav">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="watisdb.html">Wat is D&B</a></li>
<li><a href="dbnederland.html">D&B in Nederland</a></li>
</ul>
</div>
添加了html
【问题讨论】:
-
请为您的导航栏添加 HTML How to create a Minimal, Complete, and Verifiable example
-
这是 CSS,不是 HTML。
-
@WaleedIqbal 为了能够提供帮助,我们需要Minimal, Verifiable example
-
@Simplicity 添加了 html
标签: html css html-lists whitespace nav