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

Overlaying Images 2

Status
Not open for further replies.

fatcodeguy

Programmer
Feb 25, 2002
281
0
0
CA
Hi, is there an easy no-javascript way of overlaying two 64x64px images over each other? If not, is there a javascript way?

Thanks!!
 
what do you mean by overlaying?

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
I have two transparent GIFs, and I want one to show up over the other, using only the 64x64px area. The alternative is going into an image editor and doing it that way, but I suck with image editing tools and i'd MUCH rather be able to do it on the coding side.

Any suggestions?
 
Code:
<img src="MyTopPic.gif" width="64" height="64" alt="" style="background: url(MyBottomPic.gif);" />
How about this. No JS, no hassle. One tag, two pics.
 
you could also try:

Code:
<img src='image1.gif' style='position:absolute; left:30px; top:20px;'>
<img src='image2.gif' style='position:absolute; left:40px; top:30px;'>

this gives you more freedom in howmuch the images will overlap each other. the top- and left-attributes give the distance from the parentelement (e.g. td). to place images statically on the screen (won't scroll) use "position:fixed".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top