WebSite X5Help Center

 
David K.
David K.
User

Background Image in the content slider is not responsive in mobile View  en

Autor: David K.
Visitado 81, Followers 2, Compartido 0  

I need help in making background images of my content slider responsive.I have tried the custom code shared by kolosim here before but it does not seem to work. kindly someone help with this. This is the link to the website https://www.mobile-store.co.ke/

I have attached also the screenshot of the background images.

Publicado en
3 RESPUESTAS - 1 ÚTIL - 1 CORRECTO
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Usuario del mes ESUsuario del mes PT

(It > En) ... ...to try to fix the current situation a bit, try replacing my previous code with this one for your page selector contentslider (157):

<script>
$( document ).ready(function() {// K>;
/** --- resize ratio x WSx5 ContenSlider by KolAsim --- **/
ritardoK = 1; // secondi di ritardo;
wK = 1920; // larghezza immagine (valore pixel (o rapporto razionale W));
hK = 770; // altezza immagine (valore pixel (o rapporto razionale H));
setTimeout(function(){//K1>;
ridimensionaK();
}, ritardoK * 1000); //K1<<; //non toccare;
}); //K<<;
$(window).on('resize', ridimensionaK);//Kr > | <<
//---------------f K2-----------------------------
function ridimensionaK() {//K2>;
setTimeout(function(){ //K3>;
wwK= window.innerWidth
|| document.documentElement.clientWidth
|| document.body.clientWidth;
ratio=Math.round(wwK/wK*100)/100;
CShK=hK*ratio;
$("#imPageRow_1,#imCell_157, #imCell_157 div").css('max-height', CShK);
$(".slide-title").css("font-size","3vW"); // x TITOLO
$(".slide-description").css("font-size","2vW"); // x DESCRIZIONE;
$(".slide-image-content").css("width","100%");
$(".slide-txt-container").css("background"," rgba(255,255,255,0.8)")
.css("width","40vW").css("z-index",1).css("border-radius","30px")
.css("margin","auto");
}, 0); //K3<<;
} //K2<<;
</script>

.

ciao

.

Leer más
Publicado en de  ‪ KolAsim ‪ ‪
David K.
David K.
User
Autor

Thank you so much, that worked... You are the OG

Leer más
Publicado en de David K.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Usuario del mes ESUsuario del mes PT

... I checked online, I would say that the result is quite acceptable...
... thanks to you too for appreciating it...

.

ciao

.

Leer más
Publicado en de  ‪ KolAsim ‪ ‪