Skip to main content
aaronw51765599
Known Participant
September 29, 2017
Answered

How do you layer images together

  • September 29, 2017
  • 2 replies
  • 1883 views

How do you layer multiple images together.

    This topic has been closed for replies.
    Correct answer Jon Fritz

    Generally, I would do that in Photoshop, then bring the composite image over to DW as a PNG (if some transparency is necessary).

    In Dreamweaver, you would use the CSS property position:absolute, then drag your images to where you want them in the Design View window, or set top and left settings in the css. However, unless you're very familiar with how to make it work correctly, you'll end up with a mess, especially on small screens.

    2 replies

    Nancy OShea
    Community Expert
    Community Expert
    September 29, 2017

    Layering images on the web is not a good practice.  As Jon said, make your layered image in Photoshop and then use File > Export > ExportAs > JPG or PNG with transparency.   Make sure to lower the quality slider to reduce file size and save bandwidth.  See screenshot.

    Nancy O'Shea— Product User & Community Expert
    Jon Fritz
    Community Expert
    Jon FritzCommunity ExpertCorrect answer
    Community Expert
    September 29, 2017

    Generally, I would do that in Photoshop, then bring the composite image over to DW as a PNG (if some transparency is necessary).

    In Dreamweaver, you would use the CSS property position:absolute, then drag your images to where you want them in the Design View window, or set top and left settings in the css. However, unless you're very familiar with how to make it work correctly, you'll end up with a mess, especially on small screens.

    aaronw51765599
    Known Participant
    September 29, 2017

    Then will I be able to isolate certain layers for links and rollover effects?

    Jon Fritz
    Community Expert
    Community Expert
    September 29, 2017

    With a composite image, you could use a responsive image map javascript (there are a bunch available online). Standard image maps won't scale with the image in responsive sites. The coordinates for the hot spots are fixed, so if the image shrinks/grows, they won't be in the correct positions anymore.

    Adding rollovers to multiple images that are stacked using the position:absolute method has its own issues, but would generally be easier, especially if you're not familiar with the script you'd be using on a composite image. The trickier part of using stacked images would be in getting them to be responsive so they don't fall apart on mobile devices.

    It ultimately depends on the code you come up with though.