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 2,680 times
0
hussain nayani
- 187
- 1
- 2
- 13
-
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
- 15,934
- 3
- 32
- 66
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
- 93,110
- 25
- 145
- 156