Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS end of line character

Tags:

css

eol

Okay, what I want is this: When the <p> tag ends with </p>, I want to add a character at the end of the line. For example

<p>Something and more!</p>

Should look like

Something and more!_

Where the '_' (underscore) is the added character.
Is this possible with CSS?
Is it also possible at the end of a line?

like image 804
Highmastdon Avatar asked Nov 01 '11 20:11

Highmastdon


3 Answers

Yes it is possible

p:after{
    content:"_";
}
like image 175
Nasreddine Avatar answered Oct 22 '22 01:10

Nasreddine


If I've understood your question right, then I think the following works as you require:

p:after {
    content: '_';
}

JS Fiddle demo.

Which seems compatible even with IE 8 and above.

like image 24
David Thomas Avatar answered Oct 22 '22 01:10

David Thomas


You can use the pseudo-class :after:

p:after { content: '_'; }

It’s not possible for each line though, as CSS practically does not know about “lines”.

like image 2
poke Avatar answered Oct 22 '22 02:10

poke