Log in

View Full Version : Help positioning image on mobile view



wyclef
12-02-2019, 07:20 PM
Hey, wondering if anyone has an idea how to adjust the main header image on the following page so that I can position it more to the left on mobile view. It seems to use some weird Transform3d style that I know nothing about and is always recalculating positioning. You will need to use dev tools to check this out but the line of code I am interested in is...


<img class="mfn-parallax" src="https://themes.muffingroup.com/be/biolab/wp-content/uploads/2016/09/home_biolab_intro.jpg" alt="parallax background" style="width: 1586.62px; height: 909px; transform: translate3d(-442.809px, -42px, 0px);">

https://themes.muffingroup.com/be/biolab/

molendijk
12-03-2019, 08:22 PM
The reason why this doesn't work on mobile devices is that the pixel values for the width and the height are much too big for small screens. Try percentages or vw / vh.
For transform: translate, see https://www.w3schools.com/css/tryit.asp?filename=trycss3_transform_translate.