小编Wel*_*son的帖子

IE9浮动溢出:隐藏和表宽度100%未正确显示

我试图在页面的右侧浮动一个容器.在它的左边是很多表,我需要100%宽度.我希望它们一直延伸到右边的浮动元素.当右边的那个元素我希望表扩展到页面的末尾.

这在IE以外的每个浏览器中都很有效.在IE中,所有表格都显示在右侧的浮动元素下方.我知道有一个隐藏在IE中的溢出的解决方法,但我无法让它工作.

代码如下.

<head>
<style type="text/css">
.container{margin:0 auto; min-width:1000px; max-width:1200px;}
.sidebar{float:right;width:300px;margin-left:5px;}
.tholder{overflow:hidden;}
</style>
</head>
<div class="container">
<div class="sidebar">
<img src="dsfd.jpg" heigh="600" width="295">
</div>
<div class="tholder">
<Table width="100%" border="1"><tr><td>Text</td></tr></table>
</div>
<div class="tholder">
<Table width="100%" border="1"><tr><td>Test goes here</td></tr></table>
</div>
<div class="tholder">
<Table width="100%" border="1"><tr><td>text</td></tr></table>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)

html css html-table css-float internet-explorer-9

10
推荐指数
1
解决办法
6483
查看次数

在表旁边浮动一个 Div

我正在尝试使用一个 div 来保存我的广告并浮动到页面右侧。我希望主体中的表格和文本位于广告的左侧,然后在广告结束时一直延伸到页面的右侧。

问题是主体中有一个表格,它不会显示在div的左侧。它显示在其下方。我该如何解决?

<p> 
    <div style="margin:5px; float:right;">
        <img src="ad.jpg" height="600" width="160">
    </div>         
    blah blah blah
    <table width="100%">
        <tr><td>dsf</td></tr>
    </table> 
    the table because of the 100% appears below the div 
    for the ad.jpg instead of to the left of it
</p>
Run Code Online (Sandbox Code Playgroud)

html css html-table

0
推荐指数
1
解决办法
8533
查看次数

标签 统计

css ×2

html ×2

html-table ×2

css-float ×1

internet-explorer-9 ×1