导航中链接之间的间距



我做了一个水平导航,但我希望左右链接之间有一些空间。 我的网站 我不知道该怎么做。这是我的HTML和CSS:

.navigation-homepage ul,
a {
font-family: arial, sans-serif;
font-size: 42px;
list-style-type: none;
border: 0px;
margin: 0px;
padding: 0px;
display: flex;
justify-content: space-between;
}
<div class="navigation-homepage">
<ul>
<li> <a href="index.html" style="text-decoration: none"> Home </a> <br> </li>
<li> <a href="collection.html" style="text-decoration: none"> Collection </a> <br> </li>
<li> <a href="about%20this%20website.html" style="text-decoration: none"> About this website </a> <br> </li>
</ul>
</div>

提前谢谢你:-(

您可以在容器的左侧和右侧添加一些边距:

.navigation-homepage ul, a {
font-family: arial, sans-serif;
font-size: 42px;
list-style-type: none;
border: 0px;
margin: 0px;
padding: 0px;
display: flex;
justify-content: space-between;
}
.navigation-homepage {
margin: 0 20px;
}
<div class="navigation-homepage">
<ul>
<li> <a href="index.html" style="text-decoration: none"> Home </a> <br> </li>
<li> <a href="collection.html" style="text-decoration: none"> Collection </a> <br> </li>
<li> <a href="about%20this%20website.html" style="text-decoration: none"> About this website </a> <br> </li>
</ul>
</div>

相关内容

  • 没有找到相关文章

最新更新