Click here to get back home

How do I Superimpose 2 images ?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How do I Superimpose 2 images ? Harry Haller 07-18-2005
Posted by Harry Haller on July 18, 2005, 5:14 pm
Please log in for more thread options


I am trying to display one image on top of another.

The background image is: 16 Kbytes, width: 735 px, height: 958 px. It
has a single color redbrick image on a transparent background.

The foreground image is: 3 Kbytes, width: 372 px, height: 91 px. It
has a single color black image on a transparent background. It should
appear on the right hand side about 200px down superimposed on the
background image.

Neither of my 2 attempts displayed the image.

With Demo 1 only the foreground image is shown

With Demo 2 both images are shown but the foreground is displayed
below the background (not on top of it)

How can I get this to work?

        =        =        =        =        =        =        =

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

        <head>
                <meta http-equiv="Content-Type"
content="text/html;charset=iso-8859-1">
                <title>Demo Page 1</title>
        </head>
<body lang="EN-GB" style="background url(images/background.gif)
no-repeat;">
<div id="PgTop">
        <div id="imgForeground" style="position: relative; top: 150px;
left: 360px; z-index:2">
                <img src="images/foreground.gif" alt="Foreground" width="372"
height="91" border="0"><br>
                <span style="font-size: smaller">Some text</span>
                <span style="font-size: smaller">Followed by more
text</span><br>
                <b style="font-size: larger">A Description of what it is</b>
                <h1 style="padding-top: 100px">The Page title</h1>
        </div>
</div>
<a name="TableOfContents"></a>
<h2>Table Of Contents</h2>
</html>
</body>

        =        =        =        =        =        =        =

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

        <head>
                <meta http-equiv="Content-Type"
content="text/html;charset=iso-8859-1">
                <title>Demo Page 2</title>
        </head>
<body lang="EN-GB">
<div id="PgTop">
        <div id="imgBackground" style="position: relative; top: 0px; left:
0px; z-index:1">
                <img src="images/background.gif" height="948"
width="735"></div>
        <div id="imgForeground" style="position: relative; top: 150px;
left: 360px; z-index:2">
                <img src="images/foreground.gif" alt="Foreground" width="372"
height="91" border="0"><br>
                <span style="font-size: smaller">Some text</span>
                <span style="font-size: smaller">Followed by more
text</span><br>
                <b style="font-size: larger">A Description of what it is</b>
                <h1 style="padding-top: 100px">The Page title</h1>
        </div>
</div>
<a name="TableOfContents"></a>
<h2>Table Of Contents</h2>
</html>
</body>



Similar ThreadsPosted
images won't appear in IE January 3, 2005, 8:40 pm
why a different tag for SVG images? April 4, 2006, 12:18 am
two images i corners December 11, 2004, 4:04 pm
Background images January 25, 2005, 5:19 pm
Horizontal row of images... June 20, 2005, 10:04 am
Using Icons As Images June 30, 2005, 9:14 am
CSS Floats Images and IE (Help please!) September 4, 2005, 6:55 am
Can I specify that some images load before others? December 1, 2005, 6:41 am
inline images December 27, 2005, 2:48 am
How are images best set as August 26, 2006, 10:12 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap