I want to hide text in paragraph, but there are one image and some text on it. When I'm using css to display none so all paragraph are hidden...but I want to only hide the text not image. Here is the code.
<p>
<a href="/_blog/News_and_Inspiration/post/Cooking_up_a_storm/"><img alt="" style="border: 0px solid; width: 100px; height: 150px; float: left; margin-right: 10px; margin-bottom: 10px;" src="/images/blog/Shaun-Clouston.jpg" /></a>
The executive chef of Wellington’s award winning Restaurant, Shaun Clouston is just one of the award winning New Zealand Beef and Lamb Ambassador chefs we have cooking up a storm at our Rural Women New Zealand Beef + Lamb Cooking Demonstrations over the coming months.
</p>
<p>
<img src="/images/blog/Southland Life Education Trust Car 2.jpg" alt="">
Two years ago the Southland Life Education Community Trust approached our four Southland Provincials, asking for assistance to replace their educator’s car, as the current one needed major repairs.
</p>
visibility:hidden , color:transparent and text-indent will do this.
If the point is simply to make the text inside the element invisible, set the color attribute to have 0 opacity using a rgba value such as color:rgba(0,0,0,0); clean and simple. Save this answer.
The hidden attribute hides the <span> element. You can specify either 'hidden' (without value) or 'hidden="hidden"'. Both are valid. A hidden <span> element is not visible, but it maintains its position on the page.
Try:
p {
font-size: 0;
}
And specify the font-size for any descendent elements you want visible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With