Laurent Laurent - 1 month ago 6
CSS Question

Positioning an image with margin-top

on this page http://lafon.atelier47.fr/domaines-interventions i need to positioning the image with circle using margin-top, on large desktop the positioning is ok but when the screen is smaller the positioning is not ok.
Perhaps there is a solution with css, javascript or jquery ?

My Code:

#qx-image-4919 {
margin-top: -25%;
}

Answer

Best option here is to work with media queries. I don't know at which stage you want it to kick in. There are several ways to setup your media queries. Try to paste this in your CSS:

@media (max-width: 600px) {
  #qx-image-4919 {
    margin-top: -25%; // your position when the screen is max 600px or smaller  
  }
}