- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我必须对我的列表项应用一个 clearfix 以便边框环绕我的 float ,但是一旦我添加了 clearfix,它导致我应用到列表的 wordwrap 停止工作,现在长 URL 扩展了div 到其他 div。
如果有人能帮助解决这个问题,我们将不胜感激。问题可以在这里查看:http://www.noellesnotes.com (页脚的推文部分)。
相关代码如下:
HTML
<div id="tweets">
<ul>
<li class="clearfix">
<p class="tweet">The tweet.</p>
<p class="timePosted">TIME</p>
<p class="interact">INTERACT LINKS</p>
</li>
</ul>
</div>
CSS
.tweet, .tweet a, .tweet span, .interact a{
margin-bottom: 10px;
font-size: 12px;
font-family: 'Open Sans', sans-serif, Georgia, sans-serif;
word-wrap:break-word;
}
.timePosted{
width:40%;
font-size: 12px;
float: left;
font-weight: bold;
text-align: left;
}
.interact{
width:60%;
font-size: 12px;
float: left;
text-align: right;
overflow: hidden;
}
.interact a{
margin-right: 3px;
text-decoration: underline;
font-family: 'Arvo', Georgia;
}
#tweets ul{
margin-left: 0;
padding-left: 0;
list-style: none;
}
#tweets ul li{
border: 3px solid rgba(255,255,255,0.4);
margin: 3px 0;
padding: 3px;
}
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix { /* for IE/Mac */
display: inline-block;
}
最佳答案
添加:
#tweets ul li { width: 100%; }
为我解决了这个问题:)
关于css - Clearfix 停止自动换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21220835/
960 grid 的 clearfix 与 HTML5 Boilerplate 的 clearfix - 有什么区别? 这是在 Nathan Smith 的 960 网格的 css 中找到的 clea
我想删除我的 D7 主题(MD 照片)中由 clearfix 元素引起的灰线。特别是 div class="wrap clearfix" 元素,它在 body 元素的底部有一条不必要的灰线。 我已经尝
能否请您看一下我的网页(联系页面),让我知道为什么我在 clearfix 类中仍然遇到这个问题?我什至在所有元素上都使用了 clear,但这种情况仍在发生!并且 tghe #bizleft 和 #bi
我有一个包含绝对位置和左右浮动的 div。现在我想在第一个 div 下方放置一张图片。 现在的问题是图像重叠在第一个 div 下方。我希望图像显示在第一个 div 下方而不重叠。 https://js
在我的网站上 http://jonasolaussen.se/?page_id=16如您所见,文字位于页脚下方,如果我做广告 确实会更好就像在其他网站上一样。 谁有解决办法,不胜感激! 最佳答案
我有一个布局,其中边栏是固定的,主要内容容器是流动的。
我一直无法将 clearfix 应用于许多 div,我已经学习了几个教程,找到了 here和 here ,但我的名为 Bar 的 div 仍然不会扩展以容纳 Logo 和导航 div。 这是我的标记,
我为我的网站使用了响应式骨架框架(样板)(您可以从这里获取它:http://www.getskeleton.com/)。 我有 列出具有不同高度的列。要清除嵌套列,CSS 表示我需要将 .clearf
Content 1 Content 2 CSS: .parent { normal styling for pare
考虑这种情况: 有一个内容宽度可变的布局,固定侧边栏 float 到右侧。所述布局的容器正在使用 clearfix 清除右侧 float 在内容 block 内还有另一个 block 做同样的事情。第
这个 ( http://jsfiddle.net/77RRA/1/) 有效,而这个 (http://jsfiddle.net/77RRA/) 无效。 clearfix 不是应该替换行 吗? ? 最佳
我想给#footer 内的元素p 一个top-margin 值,但是clearfix 不起作用,而且margin 一直在其父元素外折叠,为什么?下面的代码,#fotter 和 clearfix 类在代
最后一个问题。我继承的代码如下: .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility:
我是 Bootstrap 的新手,我遇到了 clearfix 的问题。我正在尝试设计一个具有 3 个内容列(可变高度)和第 4 个固定宽度的广告列的网站。
我正在尝试使用 clearfix 而不是清除两者,但由于某种原因它不起作用。我按照教程做了所有的事情。 我应该怎么做才能让它发挥作用? * { margin: 0;
我有以下 HTML 结构: %aside.sidebar %main %article %h2 %aside.picture %img %p %articl
最近我正在查看一些网站的代码,看到每个 上过课clearfix . 在 Google 上快速搜索后,我了解到它有时是针对 IE6 的,但实际上什么是 clearfix? 您能否提供一些带有 clear
我创建了一个html,可以找到http://temp87.web44.net/temp.html .我面临的问题是页脚后的页面底部有一条灰色 strip ,并且该页面未占用 100% 的浏览器空间。
是否有类似 float 和 clearfix 但用于垂直对齐的技术。 我想分隔不同的元素(内联或向左浮动),以便它们始终与顶部或底部对齐。 在此jsFiddle我希望红色和绿色水平对齐。我无法更改 C
我对 clearfix 到底是什么感到有点困惑。一方面,我们遇到零高度 div 的情况,其中 float 元素不占用空间。解决方案是将以下 clearfix 类放在容器上: .clearfix {
我是一名优秀的程序员,十分优秀!