Here's a clever way to insert a new line before every span tag.
span {
display: inline;
}
span:before {
content: "\a ";
white-space: pre;
}
<p>
First line.<span>Next line.</span> <span>Next line.</span>
</p>
Following the same pattern, I would like to add a new line at the end of each input
element. Why doesn't it work for the input
element?
input{
display:inline;
}
input::after{
content:"\a ";
white-space:pre;
}
content:<input id="1th" type="text" >
content:<input id="3th" type="text" >
content:<input id="4th" type="text" >