如何我中心与此代码对(border-bottom
)菜单文本如何在(底部边框)中心菜单文本
请帮我改正以下HTML/CSS代码
CSS & HTML
#main-menu {
width:all;
height:60px;
background-color:#555;
}
#main-menu a {
text-indent: 85px;
padding:15px;
position: relative;
text-decoration:none;
color:#fff;
line-height: center;
float:right;
margin:center;
left: -180px;
display: inline-block;
display: table-cell;
text-align:center;
outline-width: center;
}
#main-menu a:hover {
color: #ffa500;
border-bottom:2px solid #ffa500;
}
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<title>Hi</title>
<meta charset="utf-8">
</head>
<body>
<div id="main-menu">
<a href="#">Home</a>
<a href="#">Blog</a>
<a href="#">Sign Up</a>
<a href="#">login</a>
<a href="#">call us</a>
<a href="#">vip</a>
</div>
</div>
</div>
</body>
</html>
感谢...
这么多的CSS错误。但现在只需删除'text-indent:85px;'并使用'margin'和'padding'。 – Huelfe