Open the browser web tools and inspect the element with hte gap. You will quickly see where the issue is. Here is how using:
1. Chrome:
Open Chrome DevTools - Chrome Developers[
^]
2. FireFox:
Firefox DevTools User Docs — Firefox Source Docs documentation[
^]
To answer your questions:
1. I want to get rid of that nasty ***extra gap*** ... after the last pill item.
Your design is heavily flawed.
If you resize the browser window, the number of elements that are displayed is varied. Reduce the width to the minimum the browser will allow (mobile device size) you will only see the first 12 items. I have a 4k screen and when I maximise the browser window, I do see the gap that you describe.
This is working 100% as you have designed it. Here is why:
@keyframes marquee {
0%{
transform: translateX(0%);
}
100%{
transform: translateX(-100%);
}
}
The above code takes into consideration the width of the element and will move it left 100% of it's width from where it started.
Your design takes into consideration the width of the elements, not the width of the viewport (visible area).
Also, for a marquee to work, you need to join the start to the end, like a stamp wheel, for the information to seem seemlessly scroll.
Next is the animation...
SOLUTION
If you want to use your style of marquee and have a gap, chec out this example:
Marquee infinite div scroll pure css[
^]
But if you want to remove the gap, be mindful of the viewport size and look at this example:
Pure CSS marquee - Infinite Horizontal Text Scroll Without Break[
^]
2. I made this UI ... when you hover your mouse on the carousel... the motion stops
If you created this, then you would know why the motion stops. This is why:
#categories:hover #inner_categories{
animation-play-state: paused;
}
Google Search is your friend - all links provided in this answer were from using Google Search. I would suggest learning how to use it. Here is the search that I used to find the two above examples:
pure css scolling marquee[
^]