Forum Moderators: open

Message Too Old, No Replies

Reducing space after H tags

Is there an easy way to do this that works across all browsers?

         

storevalley

1:04 pm on Aug 31, 2003 (gmt 0)

10+ Year Member



By default, when header tags are used, a gap is left before the next line regardless of whether there are any breaks after the tagged text.

Has anybody found an easy way of controlling the size of this gap to make it smaller that works across all browsers?

I am working on a site with a very tight design at the moment (sigh ... I did tell the client that HTML likes to breathe) and need to reduce this space.

netcommr

1:15 pm on Aug 31, 2003 (gmt 0)

10+ Year Member



use a combination of 'margin' and 'line-height' in your style.

such as:

<h1 style="margin:0px;">hello</h1>

or

<h1 style="line-height:0;">hello</h1>

or bump them right together

<h1 style="margin:0px;line-height:.5;">hello</h1>

storevalley

1:27 pm on Aug 31, 2003 (gmt 0)

10+ Year Member



thx netcommr ... just what I needed :)

g1smd

5:54 pm on Aug 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I needed that for something slightly different too.

I was just wondering how to do something. I took a break from that otherjob for a few minutes, just to read some posts here, and the 5th one that I read answered my question.

Good timing!