Decreasing window width (of browser) causes <body> to stop stretching to fit the entire page?

I have a <header> and it stays stretched as regular, but my <body> has an almost... margin that isn't really a margin on its right for some reason. Pictured is two screenshots of the <header> being highlighted and the <body> being highlighted layered on top of eachother to show what I mean. You'll notice the <body> for some reason has empty space on its right. I tried giving both <body> and <html> width: 100%; but it didn't work. This problem only arises when I decrease the window size. When the window is windowed fullscreen nothing is wrong.
No description
7 Replies
ἔρως
ἔρως5w ago
this means that something is overflowing in this case, looks like it is ... everything
Kivory
KivoryOP5w ago
can you explain further? I'm quite a beginner.
ἔρως
ἔρως5w ago
no, that's literally it something is just wider than the available space since mobile browsers have to make shitty 90's sites into something "responsize", they zoom out in these situations also, make sure you have the correct meta tag
Kivory
KivoryOP5w ago
Ah. I thought even when this happens that the <body> tag would still stretch
ἔρως
ἔρως5w ago
not if it is overflowing
Kivory
KivoryOP5w ago
Found it. I have an element I have purely for decorative purposes with a position: absolute; that's causing this. Is there a way to make it so that this element just "gets ignored" during window resizing? it's kind of just meant to be in the background, not interrupting any of the other elements
ἔρως
ἔρως5w ago
position it from the right side instead of the left
Want results from more Discord servers?
Add your server