Christoph Losert: Absatz in CSS Datei?

Hi,

wie kann ich in einer CSS-Datei die Absatzgestaltung festlegen,
die ich sonst hier stehen hatte:

<body>

<p style="margin-top: 0; margin-bottom: 0">test</p>

</body>

danke!

  1. Hallo,

    <p style="margin-top: 0; margin-bottom: 0">test</p>

    Vielleicht so?

    p { margin-top: 0; margin-bottom: 0; }

    Bitte lies noch mal das Kapitel zu CSS in SELFHTML.

    Christian

    --
    Hast Du einen Beitrag? Nur her damit!
    http://aktuell.de.selfhtml.org/tippstricks/beitrag.htm
    SELF-Code: (http://emmanuel.dammerer.at/selfcode.html)
    sh:) fo:) ch:] rl:( br:> n4:& ie:% mo:) va:) de:] zu:) fl:( js:| ss:) ls:[
  2. <p style="margin-top: 0; margin-bottom: 0">test</p>

    p {margin-top: 0; margin-bottom: 0}

    oder besser:

    p.alternativ {margin-top: 0; margin-bottom: 0}

    dazu kommt aber das html-tag:

    <p class="alternativ"> text </p>

  3. Hallo Christoph,

    <p style="margin-top: 0; margin-bottom: 0">test</p>

    p { margin-top:0; margin-bottom:0; } oder
    p.irgendwas { margin-top:0; margin-bottom:0; } (dann eben <p class="irgendwas">)
    aber wo liegt jetzt genau das Problem?

    Grüße aus Nürnberg
    Tobias

    --
    sh:( fo:) ch:? rl:( br:< n4:& ie:% mo:| va:) de:] zu:) fl:( ss:| ls:[ js:|
    (Selfcode -> http://emmanuel.dammerer.at/selfcode.html)