<div class="price heading-font">
<span>$5 000</span>
"/Day"
</div>
I'm stuck, I normally just go into styles, copy the element, and remove it through CSS but the text "/day" doesn't have a style. How can i remove the text?
<div class="price heading-font">
<span>$5 000</span>
"/Day"
</div>
I'm stuck, I normally just go into styles, copy the element, and remove it through CSS but the text "/day" doesn't have a style. How can i remove the text?
You can make the font size 0 for the whole div and then make it something positive for the span within it.
Because the selector is more specific it will override the div’s setting.
This method has the advantage that the text you don’t want to show isn’t taking up space, but any borders, margins etc to the div remain.
div.price.heading-font {
font-size: 0;
}
div.price.heading-font span {
font-size: 16px;
}
You can use CSS
to hide "/Day" text. First, apply font-size
to 0
on .price
class and then give the initial font-size
to .price > span
as follows:
.price {
font-size:0;
}
.price > span {
font-size: 16px; /* assuming 16px was your initial font size */
}