【发布时间】:2012-08-10 18:39:13
【问题描述】:
我正在为以下网站设计主题(由 Network Solutions nsCommerceSpace 提供支持)的 HTML 布局:
<div id="ctl00_breadcrumb" class="breadcrumb">
<span id="ctl00_breadcrumbContent">
<span><a href="/">[Name of Webstore]</a></span>
<span> > </span>
<span><a href="/page.aspx">Page</a></span>
<span> > </span>
<span>Here is a very long title of a product that is causing me much frustration because it jumps out of place.</span>
</span>
</div>
自动生成带有<span>&nbsp;&gt;&nbsp;</span>的span标签来分隔每个项目。
这是我的问题:http://jsfiddle.net/5fvmJ/
有没有办法让最后一个 SPAN 标记填充空白空间,并在它碰到右侧时结束?我只会使用overflow: hidden; 来隐藏多余的文字。
有什么想法吗?我知道拥有所有 SPAN 会使这变得困难,但它是网站的内置功能,我无法更改。
【问题讨论】: