我该如何在以下代码中居中文本(对CSS不熟悉,望指教):
suggestion_active {
background-image: url(../images/suggestion_active.jpg);
background-repeat:no-repeat;
position:inherit;
float:inherit;
width: 100px;
height: 36px;
}
suggestion_active_text {
possition: absolute;
font-family: "Lucida Grande", Tahoma;
font-size: 12px;
font-weight: lighter;
text-align: center;
color:#000;
vertical-align: middle;
padding:0px;
}
HTML:
<suggestion_active><suggestion_active_text>1</suggestion_active_text></suggestion_active>
如果您能告诉我如何做到最佳实践,那将是很好的。