Html 我怎样才能把这个部门送到中心?

Html 我怎样才能把这个部门送到中心?,html,css,center,space,Html,Css,Center,Space,所以,我现在得到了这个: 如何使第二种桌子与按钮处于同一位置,因此位于中间?几乎什么都试过了,想不出别的了 请帮帮我 当前代码: .flat-table { display: inline-block; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 115%; overflow: auto; width: 90%; text-align: center;

所以,我现在得到了这个:

如何使第二种桌子与按钮处于同一位置,因此位于中间?几乎什么都试过了,想不出别的了

请帮帮我

当前代码:

    .flat-table {
  display: inline-block;
  font-family: sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 115%;
  overflow: auto;
  width: 90%;
  text-align: center;
  float: right;

  }
  th {
    background-color: #f95252;
    color: white;
    font-weight: normal;
    padding: 20px 30px;
    text-align: center;
  }
  td {
    background-color: #fff;
    color: rgb(111, 111, 111);
    padding: 20px 30px;
  }
这是表的代码

怎么办


谢谢

确保周围的div浮动,并使用:
margin:0 auto将div中的所有内容与中心对齐

看看这个:


确保周围的div是浮动的,并使用:
margin:0 auto将div中的所有内容与中心对齐

看看这个:


发布HTML代码而不是图像。发布HTML代码而不是图像。发布HTML代码而不是图像。
<div class="top">menu</div>
<div class="middle">
    <table>
        <tr><td>test1</td></tr>
        <tr><td>test2</td></tr>
    </table>    
</div>
<div class="bottom"><a href="#">button</a></div>
.top {
    height: 40px;
    width: 100%;
    float: left;
    background-color: Red;
}
.middle {
    width: 100%;
    height: auto;
    float: left;
}
.middle table {
    width: 300px;
    background-color: grey;
    margin: 0 auto;
    font-family: sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 115%;
}
.bottom {
    height: 40px;
    float: left;
    width: 100%;
    background-color: blue;
}
.bottom a {
    display: block;
    width: 100px;
    margin: 0 auto;
    height: 20px;
    background-color: yellow;
    line-height: 20px;
    text-align: Center;
    margin-top: 10px;
}
th {
    background-color: #f95252;
    color: white;
    font-weight: normal;
    padding: 20px 30px;
    text-align: center;
}
td {
    background-color: #fff;
    color: rgb(111, 111, 111);
    padding: 20px 30px;
}