Zum Inhalt springen

Abstand zwischen h2 und p-Tag

Erstellt am 14. Oktober 2003 · 1 Antwort · letzte Antwort am 14. Oktober 2003

Tags: HTML & CSS, Frage

cooper ·

Kurze Frage: Wie bekomme ich es hin den Abstand zwischen einer Überschrift (h2-Tag) und dem Paragraph-Tag <p> einzustellen?

Via CSS hab ich die beiden Tags bisher wie folgt eingestellt:

h2 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: bold;
	color: #03639C;
}

p{
	padding-right : 13px;
	text-align : left;
	vertical-align : top;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-style: normal;
	font-weight: normal;
	color: #000000;
}

Das Ergebnis sieht ungefähr so aus:

ÜBERSCHRIFT

Lorem ipsum dolor sit amet ....

Es soll aber so aussehen:

ÜBERSCHRIFT
Lorem ipsum dolor sit amet ....

Im Quelltext sind keine Umbrüche oder clearpixel.gifs.

<h2>ÜBERSCHRIFT</h2><P>Lorem ipsum dolor sit amet ....</p>

Kann mir jemand einen Tipp geben wie ich das gewünschte Ergebnis bekomme?

cooper ·

Alles klar, hat sich schon erledigt. So geht's:

h2 {
margin-bottom: 0px;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: bold;
color: #03639C;
}

p{
margin-top: 0px;
padding-right : 13px;
text-align : left;
vertical-align : top;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
font-style: normal;
font-weight: normal;
color: #000000;
}