I'm using wordpress for making a site. I want "Read more" button to be in second line without using br or "display:block"
.
Asked
Active
Viewed 3,157 times
0

hussain nayani
- 317
- 1
- 3
- 14
-
http://css-tricks.com/snippets/html/button-with-line-breaks/ – Morpheus Oct 09 '14 at 12:59
2 Answers
1
You can add a pseudo before
element with a white-space: pre
property. That would do the trick.
a:before {
content: '\A';
white-space: pre;
}
teste <a href="#">anchor</a>

LcSalazar
- 16,524
- 3
- 37
- 69
1
One option would be creating a block-level pseudo-element before the content of the <a>
element.
a.readmore:before {
content: "";
display: block;
}
Another option would be adding a line break before the content as follows:
a.readmore:before {
content: "\A";
white-space: pre-wrap; /* or pre */
}

Community
- 1
- 1

Hashem Qolami
- 97,268
- 26
- 150
- 164