Advertisement

02.22.2008 at 04:37PM PST, ID: 23186360
[x]
Attachment Details

html div css    how to position one image on top of another, relative

Asked by willsherwood in Cascading Style Sheets (CSS)

i want to position  "inner"  on top of "outer"  using a specific relative offset to "outer"
(top left corners relative to each other)

i can't quite get this to happen.

+---------------------------------+
|    outer background              |
|                                              |
|    +-------------------------+     |
|    |    inner on top            |      |
|    +-------------------------+     |
|                                              |
+---------------------------------+


<style type="text/css">
<!--

#apDiv1 {
      position:relative;
      width:919px;
      height:556px;
      left: 20px;
      top: 20px;
}
-->
</style></head>

<body>
<div align="center">
  <div>
    <div id="apDiv1"><img src="inner.gif" width="896" height="531" /></div>
  <img src="outer.jpg" width="1000" height="642" /></div>
</div>
</body>Start Free Trial
[+][-]02.22.2008 at 05:15PM PST, ID: 20963095

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Cascading Style Sheets (CSS)
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628