如何将表格放在屏幕右侧?

时间:2016-01-13 12:42:57

标签: html css

enter image description here

我想把桌子放在空间的正上方 但我不知道在哪里添加代码。 我学习php的时间不长。 这是与地图下表格相关的代码。

<div id="info_table" style="width: 700px; height: 130px;background:#356884;">
    <table border="1">
        <tbody>
            <tr>
                <td><center>lat</center></td>
                <td><input type="text" name="xPoint" id="xPoint" size="20" /><td>
            </tr>
            <tr>
                <td><center>lg</center></td>
                <td><input type="text" name="yPoint" id="yPoint" size="20" /></td>
            </tr>
        </tbody>
    </table>
</div>

2 个答案:

答案 0 :(得分:1)

可以使用flexbox并添加一些媒体查询

.flex {
  display: flex;
}
#map {
  flex: 1;
  height: 100vh;
  background-color: #CCC;
}
#info_table {
  flex: 1;
}
<div class="flex">
  <div id="map">


  </div>
  <div id="info_table" style="height: 130px;background:#356884;">
    <table border="1">
      <tbody>
        <tr>
          <td>
            <center>lat</center>
          </td>
          <td>
            <input type="text" name="xPoint" id="xPoint" size="20" />
            <td>
        </tr>
        <tr>
          <td>
            <center>lg</center>
          </td>
          <td>
            <input type="text" name="yPoint" id="yPoint" size="20" />
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>

答案 1 :(得分:-1)

将css float属性添加到主div

// include all QT headers

#ifdef emit
#undef emit
#endif

#include "predict_collector.hpp"

// do not use the QT emit below
相关问题