我有一系列内嵌显示的标记框。他们可能会超过容器的宽度。在这种情况下,我想他们创造另一种“想象的”行如下:CSS溢出框
[friend][foe][enermy][love]
[hate][indifferent]
我怎样才能达到这种效果呢?
我的设置现在以某种方式创建了非常奇怪的行为:包含[仇恨]的框的一小部分(及其背景)实际上在第一行,而框的文本和背景出现在第二行。
[friend][foe][enermy][love][]
[hate][indifferent]
定义时,这些标签我没做什么奇怪的:
.tag-label {
border-radius: 3px 3px 3px 3px;
color: #FFFFFF;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 10.998px;
font-weight: bold;
line-height: 13px;
margin: 2px;
padding: 1px 4px 2px;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
vertical-align: middle;
white-space: nowrap;
}
这里是HTML。要我删除一些元素
<div id="content">
<span class="tag-label">
<a href="/searches/search_tags?search_type=Listing&tag=search">search (1)</a>
</span>
<span class="tag-label">
<a href="/searches/search_tags?search_type=Listing&tag=text">text (1)</a>
</span>
<span class="tag-label">
<a href="/searches/search_tags?search_type=Listing&tag=cool">cool (1)</a>
</span>
</div>
你可以请张贴HTML吗? – 2012-04-02 22:54:00
HTML与CSS不匹配。请仔细检查。 – iambriansreed 2012-04-02 23:13:34
我不喜欢使用内联块,因为它在ie7-上工作起来真是太时髦了。 – iambriansreed 2012-04-02 23:17:06