Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
378 views
in Technique[技术] by (71.8m points)

html - Position div under absolute div with responsive design

I'm struggling with this "simple" problem:

I have multiple images that I need to overlap precisely, so I'm using position: absolute and z-index. I need this div centered horizontally and responsively adjusting to fullscreen

.images {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    position: relative; 
    height: auto;
}

.image {
    width: 100%;
    margin: auto;
    position: absolute;
}

The images are overlapping and displaying correctly, but they seem to have no height. The next div just displays over it, even when I use "relative" as a wrapper for both. With minimum height set, the images won't adjust dynamically.

I've been googling for several hours now and can't find any working solution. I'd be glad for any help provided.

question from:https://stackoverflow.com/questions/65832108/position-div-under-absolute-div-with-responsive-design

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...