I'm suffering from a vertical scrollbar

Guys, I'm struggling to center the content because it's creating a horizontal scrollbar, can you help me based on the code?
No description
No description
No description
No description
No description
6 Replies
Joao
Joao•14mo ago
Horizontal or vertical? 🤔 If you mean vertical and if there is not supposed to be any scrolling at all, you can try to set the height of the body element to 100vh. The vh stands for viewport height and basically means the height of the current screen. I think this should do it.
Jus Sus || 💀
Jus Sus || 💀•14mo ago
@Chaves this is the situation where border: 1px solid red can come into rescue. Apply border to everything and check which is overflowing.
Joao
Joao•14mo ago
Might want to use outline instead, as that won't cause the layout to shift.
clevermissfox
clevermissfox•14mo ago
Do you have a reset with
* ,*::before, *::after { box-sizing: border-box};
* ,*::before, *::after { box-sizing: border-box};
Or at least margin:0; on your body? You can also use that gradient on your body without making a pseudo element and change background-blend-mode: multiply; And also when using
position:absolute;
inset:0;
position:absolute;
inset:0;
replaces
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
Edited for code formatting
Chaves
ChavesOP•14mo ago
Wow, I didn't know about this background-blend-mode property, I used it and it worked perfectly! Guys, after deactivating some things, I realized that what was causing the vertical scrolling was a margin-top that I had applied to my nav
Chaves
ChavesOP•14mo ago
No description
Want results from more Discord servers?
Add your server