作者:Mars丶fasfa | 来源:互联网 | 2023-01-05 09:28
I'm unable to center this menu with links. "text-align: center;" in ul doesn't work and I've tried to find a solution for at least 1 hour now. I'm quite new to web developing, any help is appriciated.
我无法通过链接将此菜单置于中心位置。 “text-align:center;”在ul不起作用,我试图找到一个至少1小时的解决方案。我对网络开发很陌生,任何帮助都是适合的。
ul {
list-style-type: none;
background-color: #3A3A3A;
text-align: center;
margin: 0;
padding: 0;
overflow: hidden;
}
li {
display: inline;
float: left;
font-size: 22px
}
li a {
display: block;
padding: 20px 20px;
text-decoration: none;
}
li a:hover {
color: #00DBFF;
}
2 个解决方案