css3 - CSS:Fix image outside the body of container -
i have fix blue colored 'lock' image outside of container below:
so far have achieved below:
i setting image background-image of container , css container wrote is:
.container{ margin: 0 auto; max-width: 620px; background-color: $white; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2); object-fit: contain; margin-top: 30px; padding: 40px; min-height: 100px; object-fit: contain; overflow: hidden; border-radius: 5px; background-repeat: no-repeat; background-image: url("../lock.svg"); } <body> <div class="container"> </div> </body> </html>
if give background-position, image hiding behind container,
please advice how achieve this? approach correct?
if want set lock button depending on container, have set relative position container , absolute position button.
then set top , right property button depending on container.
.container { position: relative; } .button { position: absolute; top: px; right: px; }
Comments
Post a Comment