浮动表单元格在IE7 [英] Floating table cells in IE7

查看:107
本文介绍了浮动表单元格在IE7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在重新设置网站样式,但无法编辑任何标记,这导致我遇到以下问题...



我有一个表,类似于:

 < table> 
< tr>
< td>部分内容< / td>
< td>部分内容< / td>
< / tr>
< tr>
< td>部分内容< / td>
< td>部分内容< / td>
< / tr>
< tr>
< td>部分内容< / td>
< td>部分内容< / td>
< / tr>
< / table>

,我想在一行上显示所有表格单元格。在好的浏览器中,我使用:

  table tr {
display:inline;
float:left;
}

但是,这不工作在IE7。有没有任何其他CSS我可以使用来实现相同的效果?我必须强调,我没有访问的标记,没有任何表行或单元格没有任何方式直接访问它们,所以我没有办法我绝对的位置。

inline-block ,但是使用float这样的东西来表格化元素是一个罪。您可以尝试隐藏整个表,并插入一些加载图标,同时提取表信息并以语义标记显示。



在这种情况下的最佳操作方式是要求访问。只是说你不能在没有访问标记的工作。如果他们不会让你,只是不要做的工作。


I am currently re-styling a site but unforunately I am unable to edit any of the markup, which leads me to the following problem...

I have a table, similar to this:

<table>
  <tr>
    <td>Some content</td>
    <td>Some content</td>
  </tr>
  <tr>
    <td>Some content</td>
    <td>Some content</td>
  </tr>
  <tr>
    <td>Some content</td>
    <td>Some content</td>
  </tr>
</table>

and I want to display all the table cells on one line. In good browsers, I'm using:

table tr {
    display: inline;
    float: left;
}

to achieve this. However, this doesn't work in IE7. Is there any other CSS I can use to achieve the same effect? I have to stress that I have no access to the markup whatsoever and none of the table rows or cells have any way of accessing them directly so there's no way I can position absolutely.

解决方案

You can attempt inline-block but styling table elements with things such as float is a sin. You can attempt hiding the entire table and insert some load of loading icon while you extract the table info and display it with semantic markup.

Best course of action in this case is to ask for access. Just say you can't do the work without access to the markup. If they won't let you, just don't do the work.

这篇关于浮动表单元格在IE7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆