WebSite X5Help Center

 
David K.
David K.
User

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

Autor: David K.
Visited 89, Followers 2, Udostępniony 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.

Posted on the
3 ODPOWIEDZI - 1 POMOCNY - 1 PRAWIDłOWA ODPOWIEDź
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Najlepszy Użytkownik miesiąca ESNajlepszy Użytkownik miesiąca 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

.

Czytaj więcej
Posted on the from  ‪ KolAsim ‪ ‪
David K.
David K.
User
Autor

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

Czytaj więcej
Posted on the from David K.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator
Najlepszy Użytkownik miesiąca ESNajlepszy Użytkownik miesiąca PT

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

.

ciao

.

Czytaj więcej
Posted on the from  ‪ KolAsim ‪ ‪