请问为什么价格($ 33000000.33)当它跳到第二行?我需要在同一行上有一个价格和“超长标题”。基本上,当价格太高时,我需要截断像“Super Lon ...”这样的“Super Long title”,并且仍然都在同一行上。CSS截断不起作用
下面是代码:
<div class="item-description group">
<a href="/pro/test-item-with-variations">
<p class="title truncate-text" title="">Test Item with variationsktvy9i</p>
</a>
<p class="shop truncate-text" title="">
<a href="/pro">Super long title</a>
</p>
<a href="/pro/test-item-with-variations">
<p class="price">$33000000.33</p>
</a>
</div>
.item-description {
padding: 15px 10px;
background: white;
display: block;
}
a {
text-decoration: none;
color: #66c6c3;
background-color: transparent;
}
p.shop {
font-size: 14px;
}
.shop {
color: #5d6d6d;
font-size: 16px;
padding: 0;
margin: 0;
width: 50%;
float: left;
}
.truncate-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
p {
display: block;
}
p.shop a {
color: #5d6d6d;
}
p.price {
font-size: 16px;
}
.price {
color: #62c6c4;
font-weight: 600;
float: right;
}