表空间不变

时间:2017-07-04 07:06:17

标签: html css html-table

我尝试在表<tr>中放置一些小空格,但我不能这样做,我尝试这样做,但不能改变它,我该如何修复它?要了解我的问题,请看这张图片:

Image

.panel-booking .panel-body {
    padding: 0px;
    height: 100px;
}
.panel-booking  {
top:-60px; position:relative;
}
.tab-tb2 .nav-tabs li a {border-left: 1px solid #bfc1c3;height: 25px;}
#line-booking hr{margin-top: -45px; margin-left: 1px; width: 408px;color: #f00;
background-color: #ececec;
height: 1px;}


.booking-left-btn tr {line-height:30px;}
.booking-left-btn table, th, td {
}
.booking-left-btn th, td {
    padding: 5px;
    text-align: left;
}

.booking-left-btn .btn {
    display: inline-block;
    padding: 12px 7px;
    margin-bottom: 21px;
    font-size: 14px;
    margin-left: -15px;
    font-weight: normal;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    background-color: none;
    vertical-align: middle;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: none;
    border: 1px solid #bdc4cb;
    border-radius: 10px;
}

.booking-left-btn .room-detials {
    text-align: center;
    margin-left: -2px; color: #53585f;
}
.booking-left-btn .room-number {
    text-align: center;
    font-size: 15px;
    color: #444444;
}
.booking-left-btn  .panel-default {
  border-color: #ddd;
    height: 67px;
    -moz-border-radius: 12px;
    -webkit-border-radius: 12px;
    -ie-border-radius: 12px;
    -opera-border-radius: 12px;
    -chrome-border-radius: 12px;
    border-radius: 11px;
    overflow: hidden;
    width: 329px;
    margin-left: -5px;


}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
                          <div class="panel-booking">


<div class="booking-left-btn" style="margin-left:25px;">

  <table style="width:100%">


    <tr>
      <td><button type="button" class="btn btn-default">    <div class="room-detials">Room</div>
          <div class="room-number">1</div></button></td>
      <td>    <div class="panel panel-default">
      <div class="panel-heading">Mahesh H</div>
      <div class="panel-body">Panel Content</div>
    </div></td>
    </tr>
    <tr>
      <td >     <button type="button" class="btn btn-default">    <div class="room-detials">Room</div>
          <div class="room-number">1</div></button></td>
      <td> <div class="panel panel-default">
      <div class="panel-heading">Panel with panel-default class</div>
      <div class="panel-body">Panel Content</div>
    </div></td>
    </tr>
    <tr>
      <td >     <button type="button" class="btn btn-default">    <div class="room-detials">Room</div>
          <div class="room-number">1</div></button></td>
      <td> <div class="panel panel-default">
      <div class="panel-heading">Panel with panel-default class</div>
      <div class="panel-body">Panel Content</div>
    </div></td>
    </tr>
    <tr>
      <td >     <button type="button" class="btn btn-default">    <div class="room-detials">Room</div>
          <div class="room-number">1</div></button></td>
      <td> <div class="panel panel-default">
      <div class="panel-heading">Panel with panel-default class</div>
      <div class="panel-body">Panel Content</div>
    </div></td>
    </tr>
    <tr>
      <td >     <button type="button" class="btn btn-default">    <div class="room-detials">Room</div>
          <div class="room-number">1</div></button></td>
      <td> <div class="panel panel-default">
      <div class="panel-heading">Panel with panel-default class</div>
      <div class="panel-body">Panel Content</div>
    </div></td>
    </tr>
    <tr>
      <td >     <button type="button" class="btn btn-default">    <div class="room-detials">Room</div>
          <div class="room-number">1</div></button></td>
      <td> <div class="panel panel-default">
      <div class="panel-heading">Panel with panel-default class</div>
      <div class="panel-body">Panel Content</div>
    </div></td>
    </tr>
  </table>


</div>


                            </div>

2 个答案:

答案 0 :(得分:0)

使用 &nbsp;

<div class="panel-body">&nbsp;Panel Content</div>

如果在表格之间,则在表格标签中使用cellspacing="20"

答案 1 :(得分:0)

你能尝试使用&amp; nbsp ;这可以用作技巧