我想将中心设置为.user-menu位置,但下面的代码不起作用.我怎么解决这个问题?
CSS
* {
margin: 0px;
padding: 0px;
font-family: Tahoma;
}
.centered {
margin-left: auto;
margin-right: auto;
}
.menu-items {
float: left;
height: 90px;
margin-left: 10px;
margin-right: 10px;
}
.profile {
width: 72px;
height: 72px;
padding-left: 10px;
padding-right: 10px;
background-repeat: no-repeat;
background-position: center;
background-image: url('Images/folder-contacts-icon.png');
border-radius: 5px;
}
.bought-tickects {
width: 72px;
height: 72px;
padding-left: 10px;
padding-right: 10px;
background-repeat: no-repeat;
background-position: center;
background-image: url('Images/tickets-icon.png');
border-radius: 5px;
}
.clear {
clear:both;
}
.user-menu {
margin-left:auto;
margin-right:auto;
}