Zuko
August 24, 2023, 6:10pm
1
Hey everyone,
I have tried all the different centering methods I know but for some reason, nothing is working on the “Scroll” with the arrows underneath it. Currently working in the 320px media query view, if you inspect and view my portfolio website at 320px you will see what I am talking about. Does anyone know how I can center it?
Get rid of the margins and use 50%
for the left
offset.
.scroll {
position: absolute;
bottom: 0;
transform: translateX(-50%);
display: flex;
flex-direction: column;
align-items: center;
left: 50%;
margin-left: unset;
margin-bottom: unset;
}
By the way, I would suggest you unhide the overflow on the page so you can see it and fix it.
3 Likes
Zuko
August 24, 2023, 8:43pm
4
Wow, never knew about unset
until now, thanks! And thanks for the suggestion, now I can see that wave-two is overflowing.
No problem, and yes the unset
value is quite handy.
You can also use it with the all
property which can come in useful as well (mainly for custom-styled elements).
<button>Click</button>
<input type="text">
button,
input {
all: unset;
}
The all shorthand CSS property resets all of an element's properties except unicode-bidi, direction, and CSS Custom Properties. It can set properties to their initial or inherited values, or to the values specified in another cascade layer or...
2 Likes
Zuko
August 24, 2023, 8:55pm
6
That’s very helpful, learn something new every day. Thanks for the support!
1 Like
system
Closed
February 23, 2024, 8:55am
7
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.