question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prev and Next arrows appear on top and bottom respectively

See original GitHub issue

Why the arrows prev and next appears on the top and the bottom of the carousel? I need that they appear on the sides but i haven’t any luck with that.

I’m using the JS code like this:

$('#slick-carousel').slick({
        infinite: true,
        autoplay: true,
        arrows: true,
        centerMode: false,
        mobileFirst: false,
        variableWidth: false,
        prevArrow: '<div><button type="button" class="tc-twitter-arrows tc-arrow-prev"></button></div>',
        nextArrow: '<div><button type="button" class="tc-twitter-arrows tc-arrow-next"></button></div>',
        dots: false,
        responsive: [
        {
          breakpoint: 768,
          settings: {
            arrows: false,
            centerMode: true,
            centerPadding: '40px',
            slidesToShow: 2
          }
        },
        {
          breakpoint: 480,
          settings: {
            arrows: false,
            centerMode: true,
            centerPadding: '40px',
            slidesToShow: 1
          }
        }
      ]
    });

This is the CSS for the buttons:

.tc-twitter-arrows
{
    background-image: url('http://welovestyles.com/wp-content/uploads/loook/carousel-arrows-333333-50.png');
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    margin: 0;
}

.tc-twitter-arrows.tc-arrow-prev{
    width: 40px;
    height: 40px;
    background-position: 0 0;
}
.tc-twitter-arrows.tc-arrow-next{
    width: 40px;
    height: 40px;
    background-position: -40 0;
}

Also, i have a question about the basic “must” css styles that need to have the slides and the container (i’m having issues with the widths and heights).

Kind regards, Gonzalo.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
moeabdolcommented, Nov 16, 2017

Same here!

0reactions
odatcommented, Jun 14, 2020

use settings below : arrows-container : '.any-selector'

Then add the selector element on any position of your code

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slick Carousel next and previous buttons showing above ...
I'm using Slick Carousel this and my "next" and "previous" arrows are appearing above and below my images, rather than on each side....
Read more >
Solved: Prev Next arrows on Product page - Shopify Community
Solved: Hi, I am wanting to put the previous and next arrows to navigate through the previous and next products respectively. I am...
Read more >
KPI indicators with Up/Down arrows - Tableau Community
I need help in introducing KPI indicators (Up/Down arrow) for multiple columns ... with green and red colors assigned to 'Up" & "Down"...
Read more >
How to use the Timeline in Animate - Adobe Support
To move the Timeline Controls to the top or bottom, select Header Top or Header Bottom, respectively. To zoom in and zoom out...
Read more >
Using the arrow keys - Nikhef
Due to the resultant shift of the screen, the cursor then appears 20 columns to the left or right respectively of where it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found