1

Hi I have below html and css code where .first .second .third elements css coming dyanamically from plugings and .fourth element is adding later on click which having css of position:fix and left:0 but now because of parent css there are multiple position properties are already added that's why left property taking from the container instead of taking from the browser. Any way to achieve this?

.first {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1300;
    position: fixed;
}
.second {
    left: auto !important;
    transform: scale(1) !important;
    right: 0;
    width: 25%;
    border-radius: 0;
    min-height: 90vh;
    outline: none;
    position: absolute;
    min-width: 16px;
    max-width: calc(100% - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100% - 32px);
}
.third {
    padding: 8px 1px 0;
    height: 92vh;
    overflow-y: auto;
    position: relative;
    overflow-x: hidden;
    background:blue;
}
.fourth{
    background:red;
    position: fixed;
    left: 0;
    bottom: 0px;
    z-index: 9999;
    width: 400px;
    transition: 1s all;
}
<div class="first">
<div class="second">
<div class="third">
<div class="fourth">
<p>Fourth Div</p>
</div>
</div>
</div>
</div>
Sagar Kodte
  • 3,723
  • 4
  • 23
  • 52

0 Answers0