text-align:center 无法使我的按钮居中。我也尝试过“margin:0px auto”,但这也没有用。我只是想将按钮垂直堆叠在页面中间,并在它们之间留出很小的空间。我该怎么做?
<!DOCTYPE html>
<html>
<head>
<style>
body {
text-align:center;
margin:0px auto;
background-image:url("one1.jpg");
background-repeat:repeat-x;
}
.bf_button {
display:block;
background: url(bf_button_fon_right.gif) no-repeat 100%;
float: left;
outline: none;
padding-right: 32px;
text-decoration: none;
}
.bf_button:hover {
text-decoration: none;
}
.bf_button span{
display:block;
background: url(bf_button_fon_left.gif) no-repeat;
white-space: nowrap;
line-height: 74px;
padding: 0 0 0 32px;
font-family: Arial, Verdana;
font-size: 34px;
font-weight: normal;
color: rgb(0,0,0);
text-transform: none;
}
</style>
</head>
<body>
<img src="one.jpg"></img>
</body>
<div style="text-align:center;">
<br /> <br /> <br />
<a href="http://" class="bf_button"><span>Time & Attendance (Kronos)</span></a>
<br /> <br /> <br />
<a href="http://" class="bf_button"><span>401K</span></a>
<br /> <br /> <br />
<a href="http://www.bcbsil.com/" class="bf_button"><span>Medical: </span></a>
<br /> <br /> <br />
<a href="https://" class="bf_button"><span>Dental, Vision, Life, AD&D: </span></a>
<br /> <br /> <br />
<a href="https://" class="bf_button"><span>Flex Programs: </span></a>
</div>
</html>