Link to home
Start Free TrialLog in
Avatar of pillmill
pillmill

asked on

embed div in img?

Is it possible to embed or overlay a div on an img element?
The div is a photo carousel and I would like to overlay it
on a section of the image. How can I do this?
Avatar of Designbyonyx
Designbyonyx
Flag of United States of America image

<div class="wrapper">
  <img src="/path/to/img.jpg" atl="" />
  <div class="carousel">...</div>
</div>

.wrapper {
    position: relative;
}

.wrapper .carousel {
    position: absolute;
    bottom: 0;
    left: 0;
}
Avatar of pillmill
pillmill

ASKER

Thanks. The carousel appears below the image and the text of \
.wrapper .carousel ... appears in the page.

Is there a way to overlay the carousel on the image or to position
at the side of the image?
ASKER CERTIFIED SOLUTION
Avatar of Designbyonyx
Designbyonyx
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks. How do you make the carousel div
appear on top of the image? Now, it is obscured
below the picture. The image is a png.
My code has been tested and works on my end.  Can you please provide a URL or code so I can see what the problem is?  Thx