Einstellung mehrere Absatz-Formatvorlagen in css

Dies ist ein top-level-Frage und basiert mehr auf meine Unkenntnis der css als alles andere. Ich bin versuchen, um zwei Absatz-Formatvorlagen in css, mit einem 20px font-size und ein weiteres mit einem 14px font-size. Jedoch, egal, was ich scheine zu tun, die fonts kommen aus der gleichen. Anbei ein Beispiel, was mache ich jetzt, wenn jemand kann mir eine Lösung würde ich groß schätzen. Für brevities Willen verlasse ich aus un-auch notwendige-code.

den html-code sieht wie folgt aus

<p>This is the html section with 20 px font</p>

<p class="new_font"> This is the html section with 8px font</p>
/* I have also tried this with a <div class="new_font"> and and <p id="new_font>"*/

den css-code sieht wie folgt aus

p {
     /*text-indent: 1.5em;*/
     font: 20px Helvetica, Sans-Serif;
     color: white;
     overflow: hidden;
     padding: 15px;
     text-align: justify;
     background: rgb(0, 0, 0,0.3); /* fallback color */
     background: rgba(0, 0, 0, 0.7);
}
p new_font {
     /*text-indent: 1.5em;*/
     font: 14px Helvetica, Sans-Serif;
     color: white;
     overflow: hidden;
     padding: 15px;
     text-align: justify;
     background: rgb(0, 0, 0,0.3); /* fallback color */
     background: rgba(0, 0, 0, 0.7);
} 
InformationsquelleAutor Jon | 2015-11-17
Schreibe einen Kommentar