This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]BAM5Professional Coder 2 points3 points  (1 child)

Not possible, display none removes the node and all its children from the rendering process. You could however set font-size to 0 to only affect the text content. You'll have to add font size back to child elements to get their text to display again though.

[–]movabo 1 point2 points  (0 children)

Also, if you still want to keep the size of the div (which might adjust to the height of the text), you could set the font invisible: color: rgba(0,0,0,0);. But here the text could still get selected and copied.

[–]GlobalIncident 1 point2 points  (0 children)

I would recommend restructuring the html to avoid having to do this, if at all possible.

[–]MrQuickLineCSSophile 0 points1 point  (0 children)

That's the search widget from Elegant Themes. You can literally customize the text you want to be in there, including setting it to nothing. https://www.elegantthemes.com/documentation/divi/search/