how to remove right side whitespace in my web page?

hi guys, can you please help me gid rid of this white space? it only appear when i am in 438 screen size.
No description
67 Replies
clevermissfox
clevermissfox8mo ago
Looks like the scrollbar area?
Justine
JustineOP8mo ago
there is no scroll bar but i think i have solved the problem withi this <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
Justine
JustineOP8mo ago
the white space is gone
No description
ἔρως
ἔρως8mo ago
maximum-scale=1, user-scalable=0 <-- this is a pretty terrible idea, as it disables the zoom completely you're fixing design issues by obliterating the accessibility of your website
ἔρως
ἔρως8mo ago
there's stuff that's overflowing, which will cause this type of issue
No description
Justine
JustineOP8mo ago
i see, now i fix that hero thats overlapping but still i get this margin right and i also change the meta data, can you help me?
ἔρως
ἔρως8mo ago
sure where can i see this by myself?
Justine
JustineOP8mo ago
here is the updated one
No description
Justine
JustineOP8mo ago
i did not publish it yet
ἔρως
ἔρως8mo ago
by the way, a quick way to check what may be overflowing is to add this to your css:
* {
outline: 2px solid red;
}
* {
outline: 2px solid red;
}
but if i had to guess, without it being published, i will say the issue is the header
Justine
JustineOP8mo ago
ok let me send youmy header
ἔρως
ἔρως8mo ago
don't bother it's way easier if you publish it online
ἔρως
ἔρως8mo ago
i am guessing it is the header because of this
No description
ἔρως
ἔρως8mo ago
if i had to guess, the width of that header is over 325 pixels looks like 340px now
Justine
JustineOP8mo ago
header{ position: fixed; width: 100%;height: 105px; top: 0; background: #171717; display: flex;justify-content: center;align-items: center; }
No description
ἔρως
ἔρως8mo ago
so many divs ... what's the gap on this? the purple area between the name and the hamburger icon
Justine
JustineOP8mo ago
i use grid here for my lay out for the whole header section i use grid-gap 51px
ἔρως
ἔρως8mo ago
yikes! that's massive!
Justine
JustineOP8mo ago
why?
ἔρως
ἔρως8mo ago
because that's 51px that will always be taken
ἔρως
ἔρως8mo ago
you are using a margin-left on the title
No description
Justine
JustineOP8mo ago
yup to have space a little
ἔρως
ἔρως8mo ago
instead, you can use a layout like this:
grid-template-columns: <width-of-paw> auto <width-of-hamburger>;
grid-template-columns: <width-of-paw> auto <width-of-hamburger>;
and then, you actually set a decent proper gap, like 8px or even 12px
Justine
JustineOP8mo ago
here is m grid .head-content{ align-items: center; justify-items: flex-start; margin: 0 auto; display: grid;grid-template-columns: repeat(6, 1fr);grid-gap: 51px; max-width: 1390px; }
ἔρως
ἔρως8mo ago
that's a mess can you publish this somewhere? it's a lot easier than guestimating based on screenshots of unrendered twig + html and some screenshots of the website
Justine
JustineOP8mo ago
i cant yet cause its not yet done. but you guess the problem is the header only?
ἔρως
ἔρως8mo ago
yes
Justine
JustineOP8mo ago
why you recogninze quickly that its the header the problem?
ἔρως
ἔρως8mo ago
because it's the only thing that's overflowing in the screenshot
Justine
JustineOP8mo ago
here also in cmments section they have the same width with the header
No description
ἔρως
ἔρως8mo ago
that will cause the issue too, yes if i had to guess, the issue is the quotes
ἔρως
ἔρως8mo ago
see how the text in the middle can't be reduced anymore?
No description
ἔρως
ἔρως8mo ago
it's as small as it can get, and it overflows then you have just a pretty big gap between the quotes and text i can't tell exactly what's happening because there's a huge lack of context but without it being online somewhere, it will be nearly impossible to debug this by myself
Justine
JustineOP8mo ago
I just set this to overflow auto and its good now. Now Only the header is the problem
ἔρως
ἔρως8mo ago
but that means you have an horizontal scroll which usually gives a terrible experience on mobile at least to me i end up scrolling vertically and horizontally by mistake
Justine
JustineOP8mo ago
Yeah but what can you do else if its not gonna fit on mobile screen?
ἔρως
ἔρως8mo ago
fix the layout issues if you want, you can copy the html and css, then put it in a private codepen or jsfiddle or something, instead of hosting it somewhere and you can replace the images with placeholders
Justine
JustineOP8mo ago
Yeah im trying in code share though so i can share my code
ἔρως
ἔρως8mo ago
the problem isn't that i/we don't have the code
Justine
JustineOP8mo ago
But i guess thier in trouble,let me try in code pen instead
ἔρως
ἔρως8mo ago
it's that i/we can't actually see it running it's important to change stuff and mess about in the layout for example, this code here you have width: 100% but 100% can be anything - and in this case it's the width of the entire content with the overflow if you set the width to 100vw and then to 100dvw, you probably won't see this problem on the navbar, but it's possible it doesn't do anything
Justine
JustineOP8mo ago
ἔρως
ἔρως8mo ago
are you sure it is correct?
Justine
JustineOP8mo ago
yeah ijust change the data cause i use dynamic data on my code i only change the data to that like the number
ἔρως
ἔρως8mo ago
im sure there's some css missing because the number is always visible
Justine
JustineOP8mo ago
i think here is the corected one https://codepen.io/justine1607/pen/eYoQXrL
justine
CodePen
eYoQXrL
...
Justine
JustineOP8mo ago
i didnt cahnge anything to the css
ἔρως
ἔρως8mo ago
the number is still always visible
No description
ἔρως
ἔρως8mo ago
and the menu links too
Justine
JustineOP8mo ago
ouh i forget the media query on the number cause i use media to them
ἔρως
ἔρως8mo ago
btw, verify your email
No description
ἔρως
ἔρως8mo ago
i tried the full view, so i could use the browser resolution tools
ἔρως
ἔρως8mo ago
not quite there yet
No description
Justine
JustineOP8mo ago
i dont know why there is no email i recieve
ἔρως
ἔρως8mo ago
i don't know why either
Justine
JustineOP8mo ago
but with that set up you cant fine the problem? find rather
ἔρως
ἔρως8mo ago
no, because it's behaving completely different from the screenshots maybe there's some css missing?
Justine
JustineOP8mo ago
here i think this is complete now https://codepen.io/justine1607/pen/eYoQXrL
justine
CodePen
eYoQXrL
...
Justine
JustineOP8mo ago
why the hamburger button is there but in my end there none
No description
Justine
JustineOP8mo ago
i alreday saved it can you see it now? no burger button? you can only see the burger in mobile
ἔρως
ἔρως8mo ago
almost, but doesn't look like the menu you have
No description
ἔρως
ἔρως8mo ago
i don't think it's there yet
No description
Justine
JustineOP8mo ago
but just looking at my code can you spot the problem?
ἔρως
ἔρως8mo ago
that's the problem: it behaves differently, therefore it can't be compared how about this for now, just finish the backend and ignore this issue after you finish everything else, you can put the project online somewhere and we can re-visit it
Want results from more Discord servers?
Add your server