Jeremiah Bagula
Jeremiah Bagula

Reputation: 46

CSS hide plain text with no surrounding HTML?

Need to hide text behind a <br>..

Here is what is there in the HTML & CSS: JsFiddle of the issue

Yes, the <br> tag does not have anything in and does not hold content

Upvotes: 2

Views: 1739

Answers (3)

Jimmy Bosse
Jimmy Bosse

Reputation: 1404

You can use jQuery to grab the node at runtime and wrap it in a hidden span. http://jsfiddle.net/XrPuU/2

Not extremely flexible or dynamic, but if you can't control the output to begin with your options are pretty limited.

Upvotes: 2

Lukas
Lukas

Reputation: 7734

try with :after pseudo selector http://www.w3schools.com/cssref/sel_after.asp

Upvotes: 0

Steve
Steve

Reputation: 399

Why not just wrap with a div and make a class that has the visibility: hidden attribute?

.noshow { visibility: hidden;}

<div class="noshow">Some text to hide</div>

Upvotes: 0

Related Questions