html - Div 不清除 float

标签 html css

我已经删除了我的 fiddle 中的 php,因此您可以了解 css 问题。 My Fiddle ,问题是有两列,一列在左边,一列在右边,每当右列中有大量内容时,div 不会清除或推出它下面的任何内容,最初的问题是它是把它变成一个框架 - 所以我解决了这个问题,但现在右栏与下面的部分重叠了??

这里有一张图片来直观地解释一下:

enter image description here

<div class="wrapper" style=" height: auto; overflow: visible;">
    <div class="columnsContainer" style="height: auto; overflow: visible;">

        <div class="leftColumn">




               <div class="bodyheadertop" style="background-color:#498d7b;">
                        <h3>For sale</h3>
                    </div>
                        <div id="triangle-topright" style="float:right; border-top: 25px solid #498d7b; margin-bottom: 40px;">
                        </div>
                            <div style="clear:both;"></div>



    <div class="salespost">
        <div class="salespostleft">
            <h4><a href=""></a></h4>



                <ul>

        </ul>

        </div>




<div  class="salespostright">

</div>




<div style="clear:both;"></div>
</div>



</div>



<div class="rightColumn">



<div class="bodyheadertopalt" style="background-color:#498d7b;">
<h3>Successful Sales</h3>
</div>

<div id="triangle-topright" style="float:right; border-top: 25px solid #498d7b; margin-bottom: 40px;"></div>

<div style="clear:both;"></div>


                </div>
                <div  class="soldpostright"></div>
                <div style="clear:both;"></div>
            </div>

            <?php } ?>


            </div>
        </div>
    </div>

这是有问题的代码。

最佳答案

我已经解决了这个问题。问题是我使用 em 来计算我的两列。我已将其切换为像素并解决了问题。

关于html - Div 不清除 float ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23826877/

相关文章:

javascript - 如何处理 json 数组以在 jquery 中打印 html dom 中的值?

javascript - 选择框被其他选择框的选项禁用或启用

javascript - 如何使用 CSS 隐藏图像按钮以防止打印?

css - select2 css 加载时间太长

javascript - 如何在不滚动页面的情况下在加载时滚动 div 内的表格

javascript - jquery/js closest().attr() 返回未定义

html - 如何在悬停时创建像 Google +1 按钮这样的微光动画

jquery - 如何在 iPhone 和 iPad 上创建固定/绝对位置工具提示?

php - css 的 Mod_rewrite 包含问题

css - gulp-sass 解决 load_path 支持?