English 中文(简体)
如何避免重叠的 divs 包含白空: 即刻拉动属性
原标题:How to avoid overlapping divs containg white-space: nowrap property

我要在列内分布一些链接。

.cols{
    float: left;
    width: 25%; 
    white-space: nowrap;
}

HTML :

<div class="CRMP_WP_QUICKADS_cols">
    text...
</div>

图像显示结果输出 :

""https://i.sstatic.net/X3NRd.png" alt="此处输入图像描述"/ >

如何避免重叠?

最佳回答

可能的解决办法:

  • You could hide the last part: overflow: hidden; text-overflow: ellipsis;
  • You could increase the width of the divs
问题回答

设置 overflow hidden 以切断超过该列 width 的任何内容 :

.cols {
 /* ... */
 overflow:hidden;
 text-overflow:ellipsis; /* Hint that some text is hidden */
}

<强度>3选项

  1. Increase width
  2. Remove the width declaration on the divs (if you want them to expand to fit the text)
  3. set overflow: hidden on the div if you want to hide the text

您必须增加列中的 < code> width 以弥补溢出文本 。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签