1 reply [Last post]
valletta
Offline
newbie
Last seen: 16 years 24 weeks ago
Joined: 2004-08-05
Posts: 1
Points: 0

Hi There Tongue

I'm trying to create a H1 tag with my style sheet, without a break after it, so that it looks like this:

Heading1
Tekst Tekst TekstTekst Tekst TekstTekst Tekst TekstTekst Tekst TekstTekst Tekst TekstTekst Tekst TekstTekst Tekst TekstTekst

Is there a possibility to do this, so I can still use my H1 tag, and not work with a special class?

co2
co2's picture
Offline
Leader
UK
Last seen: 12 years 40 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

No break after H1 tag

Yes, you can reduce the margin on any element such as a a header or paragraph. A header will normally have a margon-top and margin-bottom by default. Simply use:

h1
{
margin: 0;
}

... to remove them all. Or:

h1
{
margin-bottom: 0;
}

...to remove the bottom margin.

Smile

The next sentence is true. The previous sentence is false. Discuss...