Wrong width for React Slick Slider in Responsive ViewRerender view on browser resize with ReactReact-slick Slider stays on same page if slides items are changedReact-slick not rendering slidesChange div size dynamically based on background-image aspect ratio and fixed heightDisable React slick slider at Min widthreact-slick with width=0 (img not displaying)React-slick: how sync 3 slidersAdd dots in each slide with React Slick sliderConsistency issue in react-slickHow to add slick-active class in Slider dots in React Slick

​Cuban​ ​Primes

Assembly writer vs compiler in VLIW architecture

Will the volt, ampere, ohm or other electrical units change on May 20th, 2019?

Break long word (not long text!) in longtable cell

How could it be that 80% of townspeople were farmers during the Edo period in Japan?

Would life always name the light from their sun "white"

What was Varys trying to do at the beginning of S08E05?

It is as easy as A B C, Figure out U V C from the given relationship

Why is the Advance Variation considered strong vs the Caro-Kann but not vs the Scandinavian?

Wireless headphones interfere with Wi-Fi signal on laptop

Why would company (decision makers) wait for someone to retire, rather than lay them off, when their role is no longer needed?

Why does SSL Labs now consider CBC suites weak?

How to redirect stdout to a file, and stdout+stderr to another one?

When did game consoles begin including FPUs?

Were any toxic metals used in the International Space Station?

Aligning group plot titles horizontally

Why can't I share a one use code with anyone else?

What metal is most suitable for a ladder submerged in an underground water tank?

Meaning of "legitimate" in Carl Jung's quote "Neurosis is always a substitute for legitimate suffering."

Single word that parallels "Recent" when discussing the near future

Why were the bells ignored in S8E5?

Is the seat-belt sign activation when a pilot goes to the lavatory standard procedure?

Is random forest for regression a 'true' regression?

tikz drawing rectangle discretized with triangle lattices and its centroids



Wrong width for React Slick Slider in Responsive View


Rerender view on browser resize with ReactReact-slick Slider stays on same page if slides items are changedReact-slick not rendering slidesChange div size dynamically based on background-image aspect ratio and fixed heightDisable React slick slider at Min widthreact-slick with width=0 (img not displaying)React-slick: how sync 3 slidersAdd dots in each slide with React Slick sliderConsistency issue in react-slickHow to add slick-active class in Slider dots in React Slick






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have implemented React Slick Slider for my website, it works proper for desktop view and take proper width accordingly, but if I switch to responsive view the width of the container is not proper and it looks all distorted.



I have tried to fix it with CSS, given 100% width to the slick-track div but nothing worked.



Following is the container : slick-track and below is the inline css being added :



width: 2.14748e+08px;
opacity: 1;
transform: translate3d(-8.05305e+07px, 0px, 0px);


Below is how I am initializing the slider in my component:



const settings = 
dots: false,
infinite: true,
speed: 500,
cssEase: 'linear',
slidesToShow: this.props.data && this.props.data.upSell && this.props.data.upSell.length>=5?6:this.props.data&& this.props.data.upSell && this.props.data.upSell.length,
rtl: rtl === "en" ? false : true,
slidesToScroll: 1,
asNavFor: null,
arrows: false,
initialSlide: rtl==="en"?0:2,
responsive: [

breakpoint: 768,
settings:
slidesToShow: 2,
slidesToScroll: 1,
infinite: true,
initialSlide: rtl==="en"?0:3,
dots: false


]
;


Below is the sample HTML structure in a loop :



<Slider className="mx-4" ...settings ref=c => (this.slider = c)>
<div class="rtl product-item" tabindex="-1" style="width: 100%; display: inline-block;">
<div class="product-shop-top">
<a href="#"><img src="" alt="" class="product-img"></a>
</div>
<div class="product-item-details">
<h5><a href="#">Product Name</a></h5>
<div class="price-wrapper">
<div class="price-box"><span class="special-price">65</span></div>
</div>
</div>
<div class="buynow-block asas"><button type="button" title="Add to Cart" class="action tocart primary"> </button><a class="towishlist">Add to Wishlist</a></div>
</div>
</Slider>


Note: Attaching the image to show the result. enter image description here



I want 2 columns in a row for responsive slick slider.










share|improve this question




























    0















    I have implemented React Slick Slider for my website, it works proper for desktop view and take proper width accordingly, but if I switch to responsive view the width of the container is not proper and it looks all distorted.



    I have tried to fix it with CSS, given 100% width to the slick-track div but nothing worked.



    Following is the container : slick-track and below is the inline css being added :



    width: 2.14748e+08px;
    opacity: 1;
    transform: translate3d(-8.05305e+07px, 0px, 0px);


    Below is how I am initializing the slider in my component:



    const settings = 
    dots: false,
    infinite: true,
    speed: 500,
    cssEase: 'linear',
    slidesToShow: this.props.data && this.props.data.upSell && this.props.data.upSell.length>=5?6:this.props.data&& this.props.data.upSell && this.props.data.upSell.length,
    rtl: rtl === "en" ? false : true,
    slidesToScroll: 1,
    asNavFor: null,
    arrows: false,
    initialSlide: rtl==="en"?0:2,
    responsive: [

    breakpoint: 768,
    settings:
    slidesToShow: 2,
    slidesToScroll: 1,
    infinite: true,
    initialSlide: rtl==="en"?0:3,
    dots: false


    ]
    ;


    Below is the sample HTML structure in a loop :



    <Slider className="mx-4" ...settings ref=c => (this.slider = c)>
    <div class="rtl product-item" tabindex="-1" style="width: 100%; display: inline-block;">
    <div class="product-shop-top">
    <a href="#"><img src="" alt="" class="product-img"></a>
    </div>
    <div class="product-item-details">
    <h5><a href="#">Product Name</a></h5>
    <div class="price-wrapper">
    <div class="price-box"><span class="special-price">65</span></div>
    </div>
    </div>
    <div class="buynow-block asas"><button type="button" title="Add to Cart" class="action tocart primary"> </button><a class="towishlist">Add to Wishlist</a></div>
    </div>
    </Slider>


    Note: Attaching the image to show the result. enter image description here



    I want 2 columns in a row for responsive slick slider.










    share|improve this question
























      0












      0








      0








      I have implemented React Slick Slider for my website, it works proper for desktop view and take proper width accordingly, but if I switch to responsive view the width of the container is not proper and it looks all distorted.



      I have tried to fix it with CSS, given 100% width to the slick-track div but nothing worked.



      Following is the container : slick-track and below is the inline css being added :



      width: 2.14748e+08px;
      opacity: 1;
      transform: translate3d(-8.05305e+07px, 0px, 0px);


      Below is how I am initializing the slider in my component:



      const settings = 
      dots: false,
      infinite: true,
      speed: 500,
      cssEase: 'linear',
      slidesToShow: this.props.data && this.props.data.upSell && this.props.data.upSell.length>=5?6:this.props.data&& this.props.data.upSell && this.props.data.upSell.length,
      rtl: rtl === "en" ? false : true,
      slidesToScroll: 1,
      asNavFor: null,
      arrows: false,
      initialSlide: rtl==="en"?0:2,
      responsive: [

      breakpoint: 768,
      settings:
      slidesToShow: 2,
      slidesToScroll: 1,
      infinite: true,
      initialSlide: rtl==="en"?0:3,
      dots: false


      ]
      ;


      Below is the sample HTML structure in a loop :



      <Slider className="mx-4" ...settings ref=c => (this.slider = c)>
      <div class="rtl product-item" tabindex="-1" style="width: 100%; display: inline-block;">
      <div class="product-shop-top">
      <a href="#"><img src="" alt="" class="product-img"></a>
      </div>
      <div class="product-item-details">
      <h5><a href="#">Product Name</a></h5>
      <div class="price-wrapper">
      <div class="price-box"><span class="special-price">65</span></div>
      </div>
      </div>
      <div class="buynow-block asas"><button type="button" title="Add to Cart" class="action tocart primary"> </button><a class="towishlist">Add to Wishlist</a></div>
      </div>
      </Slider>


      Note: Attaching the image to show the result. enter image description here



      I want 2 columns in a row for responsive slick slider.










      share|improve this question














      I have implemented React Slick Slider for my website, it works proper for desktop view and take proper width accordingly, but if I switch to responsive view the width of the container is not proper and it looks all distorted.



      I have tried to fix it with CSS, given 100% width to the slick-track div but nothing worked.



      Following is the container : slick-track and below is the inline css being added :



      width: 2.14748e+08px;
      opacity: 1;
      transform: translate3d(-8.05305e+07px, 0px, 0px);


      Below is how I am initializing the slider in my component:



      const settings = 
      dots: false,
      infinite: true,
      speed: 500,
      cssEase: 'linear',
      slidesToShow: this.props.data && this.props.data.upSell && this.props.data.upSell.length>=5?6:this.props.data&& this.props.data.upSell && this.props.data.upSell.length,
      rtl: rtl === "en" ? false : true,
      slidesToScroll: 1,
      asNavFor: null,
      arrows: false,
      initialSlide: rtl==="en"?0:2,
      responsive: [

      breakpoint: 768,
      settings:
      slidesToShow: 2,
      slidesToScroll: 1,
      infinite: true,
      initialSlide: rtl==="en"?0:3,
      dots: false


      ]
      ;


      Below is the sample HTML structure in a loop :



      <Slider className="mx-4" ...settings ref=c => (this.slider = c)>
      <div class="rtl product-item" tabindex="-1" style="width: 100%; display: inline-block;">
      <div class="product-shop-top">
      <a href="#"><img src="" alt="" class="product-img"></a>
      </div>
      <div class="product-item-details">
      <h5><a href="#">Product Name</a></h5>
      <div class="price-wrapper">
      <div class="price-box"><span class="special-price">65</span></div>
      </div>
      </div>
      <div class="buynow-block asas"><button type="button" title="Add to Cart" class="action tocart primary"> </button><a class="towishlist">Add to Wishlist</a></div>
      </div>
      </Slider>


      Note: Attaching the image to show the result. enter image description here



      I want 2 columns in a row for responsive slick slider.







      javascript reactjs ecmascript-6 responsive-design react-slick






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 23 at 15:08









      H.HusainH.Husain

      549




      549






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Finally I was able to figure out the issue, the container for slider was inside the same row where other elements on the pages were, this was causing the issue where slider was unable to calculate the width. The structure was like this before :



          <div classname="row">
          <div classname="elementone"></div>
          <div classname="elementtwo"></div>
          <div classname="slider"></div>
          </div>


          So I have moved the slider outside the row and it works fine now.






          share|improve this answer























          • Mark yuor own answer as the answer, (the small tick next your question)

            – Dehan de Croos
            Mar 24 at 15:37











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55315133%2fwrong-width-for-react-slick-slider-in-responsive-view%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Finally I was able to figure out the issue, the container for slider was inside the same row where other elements on the pages were, this was causing the issue where slider was unable to calculate the width. The structure was like this before :



          <div classname="row">
          <div classname="elementone"></div>
          <div classname="elementtwo"></div>
          <div classname="slider"></div>
          </div>


          So I have moved the slider outside the row and it works fine now.






          share|improve this answer























          • Mark yuor own answer as the answer, (the small tick next your question)

            – Dehan de Croos
            Mar 24 at 15:37















          0














          Finally I was able to figure out the issue, the container for slider was inside the same row where other elements on the pages were, this was causing the issue where slider was unable to calculate the width. The structure was like this before :



          <div classname="row">
          <div classname="elementone"></div>
          <div classname="elementtwo"></div>
          <div classname="slider"></div>
          </div>


          So I have moved the slider outside the row and it works fine now.






          share|improve this answer























          • Mark yuor own answer as the answer, (the small tick next your question)

            – Dehan de Croos
            Mar 24 at 15:37













          0












          0








          0







          Finally I was able to figure out the issue, the container for slider was inside the same row where other elements on the pages were, this was causing the issue where slider was unable to calculate the width. The structure was like this before :



          <div classname="row">
          <div classname="elementone"></div>
          <div classname="elementtwo"></div>
          <div classname="slider"></div>
          </div>


          So I have moved the slider outside the row and it works fine now.






          share|improve this answer













          Finally I was able to figure out the issue, the container for slider was inside the same row where other elements on the pages were, this was causing the issue where slider was unable to calculate the width. The structure was like this before :



          <div classname="row">
          <div classname="elementone"></div>
          <div classname="elementtwo"></div>
          <div classname="slider"></div>
          </div>


          So I have moved the slider outside the row and it works fine now.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 24 at 12:43









          H.HusainH.Husain

          549




          549












          • Mark yuor own answer as the answer, (the small tick next your question)

            – Dehan de Croos
            Mar 24 at 15:37

















          • Mark yuor own answer as the answer, (the small tick next your question)

            – Dehan de Croos
            Mar 24 at 15:37
















          Mark yuor own answer as the answer, (the small tick next your question)

          – Dehan de Croos
          Mar 24 at 15:37





          Mark yuor own answer as the answer, (the small tick next your question)

          – Dehan de Croos
          Mar 24 at 15:37



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55315133%2fwrong-width-for-react-slick-slider-in-responsive-view%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현