I want to suppress the newline for block level elements

I have these image popups which must be anchored to a block level element so that they position correctly. This means that the line containing the link, gets a newline which I don’t want. If I try to “display: inline;” the anchor point is lost and the image displays incorrectly. LINK The link is the last line on the page (every page has one), but I don’t like that extra space above it. I am sure there is a simple fix to this problem and I’m also sure you guys know what it is … Thanks!

Jack :slight_smile:

The space you are talking about is probably either margins or padding or both.

Thanks, but I don’t know how to get rid of it.

I’ve been told that all block level elements generate a newline and indeed, the element that I am using is the <p> tag. I am sure there must be a better way to do this, but I don’t know how. Every block level element I use generates the newline which I don’t want.

I have this feeling that there is a really simple way to do this which I can’t see.

Thanks :slight_smile:

Just don’t do a block element then :). Use a <span> (or you could set display:inline; for the <p> in the CSS)

Alternatively, float it, although I doubt this is the best option (I haven’t seen the page to know for sure)

The problem with that idea (which I have tried) is that the image becomes unlocked from the left hand side of the screen and starts instead where the inline element starts, in the middle somewhere.

Thanks though …

Hi,
I remember helping you get that pop up working a while back.

As Stephen said it is the default margin on that #pix p. You have that being styled from internal css in the html. You should be able to go ahead and move them to your css file.

Just add margin:0 to the p


[B]#pix a img.hid[/B] {
width: 322px; height: 238px;
position: absolute; top: -290px; left: 15px;
visibility: hidden;}

[B]#pix p[/B] {
[COLOR=Blue]margin:0;[/COLOR]
position: relative;
font-weight: normal;
font-style: normal;
}

Thank you Rayzur. You nailed it !!! :smiley: And so simple too. I knew it would have a simple fix and you did it … AGAIN Thanks ever so much.

Jack :slight_smile: