Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gif align right

Status
Not open for further replies.

seanbo

Programmer
Jun 6, 2003
407
GB
i have a gif which i intend to use as a paragraph seperator (its very wide, but only two pixels tall). nothing will ever need to line up with it horizontaly. i want it to butt up to the right of the page, but i am currently seeing a slight gap. here is thode code as it stands:

<p align=&quot;right&quot;><img border=&quot;0&quot; src=&quot;../universal/break.gif&quot; width=&quot;700&quot; height=&quot;2&quot;></p>

how can i stop it from leaving space?

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
relative position...

<p align=&quot;right&quot; style=&quot;position:relative; left: 5px;&quot;>


Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
seanbo,

you probably need to adjust your page margins, as html pages, by default have a margin of about 8 pixels (?) all the way round...

<body rightmargin=&quot;0&quot;>

this should sort out the gif, but be aware that the margin applies to the whole page. so anything else on your page which is right aligned will also touch the edge.

hope this helps,

ss...
 
ss -

I was thinking the same thing but IE has topmargin and leftmargin while NA has marginwidth and marginheight. Since IE has no rightmargin, I didn't think your solution would work...

This will work regardless of browser...

<style>
body {margin: 0px; padding: 0px;}
</style>

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
i don't want to fiddle with my border, so i've got with the relative shift.

how can i decide how many pixels to move it though? i want to guarentee no gap, but want to avoid an overlap.

____________________________________________________
If you like a post, show you care by giving it a <censored>.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top