I have a div with some sub divs that I use as tabs, and my parent div has horizontal scroll (i use this for mobile view so width is smaller). Something like this:
.parent {
display: flex;
overflow-x: auto;
padding: 15px 0 20px;
}
.tab {
font-size: 15px;
text-transform: uppercase;
padding: 10px 40px;
color: #a4b5bf;
white-space: nowrap;
}
<div class="parent">
<div class="tab">Tab 1</div>
<div class="tab">Tab 2</div>
<div class="tab">Tab 3</div>
<div class="tab">Tab 4</div>
</div>
The problem is, when I want to set up margin right on last element, it just wont move from the end of the div.. He gets the margin, you see it in the inspector but it just doesn't move.