C
C
Christina2018-02-05 21:30:11
JavaScript
Christina, 2018-02-05 21:30:11

How to add switches when there is not enough space in the block?

Hello!
How to add toggle buttons when there is not enough space for links in a block, like in a slider?
https://codepen.io/anon/pen/vdKmRp
Thanks!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-02-05
@webinar

Calculate the width of the parent, compare with the sum of the width of the items + margin + padding, if one is larger than the other, add arrows. Or initialize some ready-made slider. The same slick or owl. The main thing is that the slider can display several blocks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question