CSS <li> 修复文本越界

标签 css

考虑这种风格:

image

我试图让价格显示在价格之后:但正如您所见,它上升得很好,这是 AJAX 选择,代码如下:

<ol class="currently">    
    <li>
        <a href="html" class="btn-remove" title="Remove This Item">Remove This Item</a>                  
        <span class="label">Price:</span> 
        <span class="price">$22.00</span> - <span class="price">$35.00</span>
    </li>
</ol>

CSS:

.block-layered-nav .currently .label {
    font-weight: bold;
    text-transform: capitalize;
    display: inline-block;
    vertical-align: top;
    margin: 10px 0 0 0;
}

有什么办法解决这个问题吗?

最佳答案

因为

margin: 10px 0 0 0;

在您的 CSS 中。改成

margin: 0 0 0 0;

margin: 0;

关于CSS <li> 修复文本越界,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23807990/

相关文章:

css - 在背景图片网址中,我有 [site_url] 而不是 wordpress 中的真实网址

javascript - 将 React 17 与 webpack 5 和 babel-plugin-react-css-modules(带有 stylename 的 css 模块)集成

jquery - Bootstrap 关闭按钮不显示

html - 导航栏在 bootstrap 3 中无法正确折叠

css - 左对齐 div

html - 网站响应问题

html - CSS 按钮在悬停时平滑地变为正常大小

css - 中间带有 Logo 的水平导航

html - 为什么 'max-width' 被忽略到表格单元格上?

html - 如何让 <td> 在电子邮件模板中从内联变为阻止