WebSite X5Help Center

 
David K.
David K.
User

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

Autore: David K.
Visite 87, Followers 2, Condiviso 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.

Postato il
3 RISPOSTE - 1 UTILE - 1 CORRETTO
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Utente del mese ESUtente del mese 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

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪
David K.
David K.
User
Autore

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

Leggi di più
Postato il da David K.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Utente del mese ESUtente del mese PT

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

.

ciao

.

Leggi di più
Postato il da  ‪ KolAsim ‪ ‪