Reputation: 31
I'm editing a wordpress site that I dont have access to any of the HTML and only css. I need to input just two lines of text sort of like a "div". Is there any way to do this by only using CSS?
Upvotes: 1
Views: 44
Reputation: 91
Could you do it with :before or :after pseudo elements?
div.class-name:after {
content: 'text goes here';
display: block;
[style further as necessary]
}
Upvotes: 0
Reputation: 86094
You can use :before
or :after
pseudo elements like this.
p:before {
color: red;
display: block;
content: 'this is from css';
}
<p>hello there</p>
Upvotes: 2