Forum Moderators: not2easy

Message Too Old, No Replies

Negative h1 margin -2px

         

royalelephant

7:53 pm on Dec 27, 2004 (gmt 0)

10+ Year Member



Under a graphic logo I run a H1 tag and to cut the white space between them I've set margin to 0px. Then I tried cutting the top margin to -10px, and it worked well in Firefox, but ran the H1 and the graphic too tight in IE, so I backed off and went with -2px. Am I asking for trouble with -2px margins? (Or... is there some other clever trick to fix such alignments and white space?)

BonRouge

7:22 am on Dec 28, 2004 (gmt 0)

10+ Year Member



Have you tried :
img {display:block}

?

royalelephant

2:42 pm on Dec 28, 2004 (gmt 0)

10+ Year Member



Have you tried :
img {display:block}

No, but I sure am about to. Ty, I'll let you know how it goes.

RE

SuzyUK

3:56 pm on Dec 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Under a graphic logo I run a H1 tag and to cut the white space between them I've set margin to 0px.

what's the HTML for both ~ is the image wrapped in something that also has a default margin?

e.g.
<h1>heading</h1>
<h2>heading</h2>

above scenario would need the bottom margin of the h1 and top margin of h2 elements to be zero then a small margin set on only one of them should control the space evenly x-browser

Suzy

royalelephant

10:46 pm on Dec 28, 2004 (gmt 0)

10+ Year Member



BonRouge, looks like display: block and a couple of tweaks gives me what I want. Had to flip back and forth tween IE and FF, as they rendered slighly differently, but all in all, a clean fix with something I "obviously" ought to have had in my toolbox. Thanks