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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Positioning problem

Status
Not open for further replies.

cactus1000

Programmer
Aug 31, 2001
149
US
I need to position a transparent gif over text (the image must overlap the text somewhat).

Iv'e managed to do this using absolute positioning, but of course that only works for one browser and one screen setting.

How can I have this image overlap the text at exactly the right place in all settings and browsers?

I'm sure some kind of relative positioning is the answer, but I don't have a CSS manual at the moment.
 
Not sure if this will work, but if you contain both the text and the image in a table(plus thier coresponding <div>'s) and relativly position them, it might work. &quot;The surest sign that intelligent life exists elsewhere in the universe is that it has never tried to contact us&quot;
Bill Watterson, Calvin & Hobbes
 
I'm not sure if it works in NN?

YourTekst<img style=&quot;position:relative; left:-15px; bottom:-20px&quot; src=&quot;yourpicture.gif&quot;>
Instead of &quot;left and bottom&quot; you can use &quot;right and top&quot;

I hope this is what you mean.

Erik
 
Thanks to you both!

Boomerang, your suggestion works fine in IE.

As for Netscape, I had to come up with a bizzare work around that enabled me to overlap the text with the image (the image is a large, ornate letter &quot;s&quot;):

<h2>
<a NAME=&quot;specialprograms&quot;></a><img src=&quot;s.gif&quot;><br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pecial Programs and Areas of Concentration</h2><p>

I don't know why this allows overlap, because it really shouldn't. I think it's because I have the img tag within the <h2></h2> tags.


But I'm not complaining.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top