DIREKTKONTAKT

WP/CSS/BLOG

CSS WordPress Line break, Zeilenumbruch in Blockquotes

tasse

Mittels des Kommandos


Text

Kann man in WordPress wunderbar Zitate, die sogenannten Blockquotes einfügen. Leider hat WordPress und haben viele Themes die Eigenschaft, die Blockquotes komplett als Block, ohne Zeilenumbrüche darzustellen.

So ein Text ist dann die Folge:

One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. „What’s happened to me?“ he thought. It wasn’t a dream. His room, a proper human

Alle BR-Anweisungen und doppelte Linebreaks (Zeilenumbrüche) werden geschluckt.
Mittels dieser kleinen CSS-Anweisung in der styles.css kann man vor jedem neuen p-Element eine Leerzeile einfügen lassen:

blockquote p {
       padding-top:1em;
}

Dann sieht die Ausgabe so aus:

One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin.

He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections.

The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked.

„What’s happened to me?“ he thought. It wasn’t a dream.

His room, a proper human

Mit dieser einzelnen Code-Zeile kann man sich sehr viel Mühe und das Installieren irgendwelcher Plugins ersparen.
Am besten ist es, man erstellt sich immer ein Childtheme seines Themes und gibt alle persönlichen Änderungen in die styles.css des Childthemes ein.


Ich habe noch einmal die wichtigsten Schlagwörter (Hashtags) dieses Artikels für Sie zusammengestellt, damit Sie sich besser orientieren können:

keine vorhanden

WordPress – CSS – Blog

Alles zum Thema Bloggen, Blogtechnik und -programmierung.

Lesezeit ca.: 2 Minuten | Tippfehler melden | © Revision: | Peter Wilhelm 29. September 2015

Lesen Sie bitte auch:


Abonnieren
Benachrichtige mich zu:
guest
1 Kommentar
älteste
neueste
Inline Feedbacks
View all comments



Rechtliches


1
0
Would love your thoughts, please comment.x
Skip to content