开发者

Table is not contracting

开发者 https://www.devze.com 2023-01-27 05:24 出处:网络
Please take a look at this video, it explains my problem: http://www.youtube.com/watch?v=Zeq_BZ5QgCg It\'s a simple table. When I resize the page, the table resizes with the page to some point, but t

Please take a look at this video, it explains my problem: http://www.youtube.com/watch?v=Zeq_BZ5QgCg

It's a simple table. When I resize the page, the table resizes with the page to some point, but then stops.

I have no idea why the table behaves like that. I want it to contract just like the rest of the page.

The black lines you see are from div containers that are set to "clear:both".

The html code of the table:

<table class="tborder" cellpadding="6" cellspacing="0" border="1" align="center" id="videoevent">
<tbody>
<tr>
 <td class="thead" align="center" valign="middle" style="vertical-align:center">
  Headline
 </td>

 </tr><tr>

 <td class="alt2" align="center" style="padding:10px;">

  <div class="right" style="margin:5px 0px 10px 0px"><span id="user_online_count">refreshing...</span> persons are viewing this page</div>

  <div class="left" style="margin:5px 0px 10px 0px">OVERVIEW</div>

  <div class="c"></div>


  <div class="overviewcontainer" style="margin-right:10px;">
  <a href="./?room=1">
   <img src="/thumbs/test.jpg" class="overview-img" height="200" alt="" border="0" />
   <span class="img-headline">Jade</span>
   <span class="offline_indicator" id="oi_model_1">offline</span>  
  </a>

  </div><div class="overviewcontainer" style="margin-right:10px;">
  <a href="./?room=2">
   <img src="/thumbs/test.jpg" class="overview-img" height="200" alt="" border="0" />
   <span class="img-headline">User</span>
   <span class="offline_indicator" id="oi_model_2">offline</span>
  </a>

  </div><div class="overviewcontainer" style="margin-right:10px;">
  <a href="./?room=3">
   <img src="/thumbs/test.jpg" class="overview-img" height="200" alt="" border="0" />
   <span class="img-headline">User</span>
   <span class="offline_indicator" id="oi_model_3">offline</span>  
  </a>

  </div><div class="overviewcontainer" style="margin-right:10px;">
  <a href="./?room=4">
   <img src="/thumbs/test.jpg" class="overview-img" height="200" alt="" border="0" />
   <span class="img-headline">XXX</span>
   <span class="offline_indicator" id="oi_model_4">offline</span>
  </a>

  </div><div 开发者_如何学Cclass="overviewcontainer" style="margin-right:10px;">
  <a href="./?room=5">
   <img src="/thumbs/test.jpg" class="overview-img" height="200" alt="" border="0" />
   <span class="img-headline">admin</span>
   <span class="offline_indicator" id="oi_model_5">offline</span>
  </a>

 </div>

 <div class="c"></div>

</td>
</tr>
<tr>
<td colspan="2">
 Viewers: <span id="users_in_chat">waiting for refresh</span>

</td>
</tr>
</tbody>
</table>

I see nothing in the style of the table that could cause this behavior:

td[align=center] {
text-align: -webkit-center;
}
td[valign=middle] {
vertical-align: middle;
}
element.style {
}
.thead {
background: #CA1B03;
color: white;
font: normal normal bold 11px/normal tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
td, th, p, li {
font: normal normal normal 10pt/normal verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
/*user agent stylesheet*/
td, th {
display: table-cell;
vertical-align: inherit;
}
Inherited from table#videoevent.tborder
.tborder {
color: black;
}
/*user agent stylesheet*/
table {
border-spacing: 2px 2px;
border-collapse: separate;
}
/*Inherited from div.dynwrap.page*/
Style Attribute {
text-align: left;
}
.page {
color: black;
}
/*Inherited from body*/
body {
color: black;
font: normal normal normal 10pt/normal verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}


Maybe cause that there are some nowrap elements or elements with fixed width inside td elements? Video, images or style="white-space: nowrap;"?

0

精彩评论

暂无评论...
验证码 换一张
取 消