Element with Left 100% overlaps Container Border

.container {
position: relative;
display: flex;
align-items: flex-end;
width: 60vmin;
height: 20vmin;
outline: 0.5vmin solid black;
}
.arrow {
position: absolute;
width: 1vmin;
height: 80%;
left: 100%;
background: red;
}
.container {
position: relative;
display: flex;
align-items: flex-end;
width: 60vmin;
height: 20vmin;
outline: 0.5vmin solid black;
}
.arrow {
position: absolute;
width: 1vmin;
height: 80%;
left: 100%;
background: red;
}
Hey, I'd like to be able to use percentages to move the red arrow around using JS. However giving it the property Left: 100% seems to overlap the border of my container. Could someone help me out with this?
3 Replies
Schroedinger
Schroedinger2y ago
Edit fiddle - JSFiddle - Code Playground
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
Schroedinger
Schroedinger2y ago
heres a jsfiddle Any positioning method would be fine as long as I can position it from 0-100%
MarkBoots
MarkBoots2y ago
overflow: hidden or overflow-x: hidden if you only want it on the horizontal axis
Want results from more Discord servers?
Add your server