This may not be acceptable to everyone, but I will still comment on it. I used
pseudo :after
on the body and applied
position: fixed
below a certain point of view on css however i put
.classname
but not
.classname:after
on the item. I will post CSS below. that it forced to fix the position of the page so that it does not scroll.
full CSS that matters:
body { background-color: #5c2028; color: #ffffff; min-width: 100%; min-height: 100%; -webkit-box-sizing: border-box !important; -moz-box-sizing: border-box !important; -ms-box-sizing: border-box !important; box-sizing: border-box !important; overflow-x: hidden; } body.bg{ background-image: url('../img/background.jpg'); background-repeat: no-repeat; background-position: center center; background-size: cover; background-clip: none; min-width: 100%; min-height: 100%; width: auto; height: auto; } body.bg:after{ content : ""; background-image: url('../img/hildasball_7_d_s_bg.jpg'); background-repeat: no-repeat; background-position: center center; background-size: cover; background-clip: none; display: block; position: fixed; top: 0; left: 0; opacity : 1.0; z-index: -2; min-width: 100%; min-height: 100%; width: 100%; height: 100%; } @media (max-width: 767px) { body{ min-height: 800px; }
/ * Initially, I put body.bg not body.bg:after, because of which things don't scroll, and I ended up getting confused as hell * /
body.bg:after{ position: fixed; } .floatContact { float: none; } }
Alex139602
source share