Problem with responsive navbar

I having this issue where when I open my website on a phone (second picture), the navbar doesnt fit, the hamburger menu is way in the right (third picture). But when I scale my window down to phone size on pc (first picture), every thing works, the about me and other A tags go into a menu. Any idea why that might be?
No description
No description
No description
25 Replies
Tiger tan
Tiger tanOP17mo ago
i even added a max width and overflow hidden
No description
Chris Bolson
Chris Bolson17mo ago
Have you set the viewport meta tag? You should have something like this: <meta name="viewport" content="width=device-width, initial-scale=1.0">
Tiger tan
Tiger tanOP17mo ago
yh
No description
Tiger tan
Tiger tanOP17mo ago
i tried to add max-width to nav to try and fix it and this is the result:
Tiger tan
Tiger tanOP17mo ago
No description
Tiger tan
Tiger tanOP17mo ago
No description
Chris Bolson
Chris Bolson17mo ago
If possible I suggest that you set up a codepen or similar so that somebody can test it out and be able to help better.
Tiger tan
Tiger tanOP17mo ago
the code is a bit messy and im not sure how to replicate the problem on code pen since the problem happens when i open it on phone
Chris Bolson
Chris Bolson17mo ago
opening your codepen on the phone doesn't appear to show any issues.
Tiger tan
Tiger tanOP17mo ago
yh the problem happens when i try to view on phone or tablet
ἔρως
ἔρως17mo ago
the content is missing, which can be the difference can you update it to include the content as well?
Tiger tan
Tiger tanOP17mo ago
i updated it but i only managed put the landing page in, since the other content are generated based on a jason file
ἔρως
ἔρως17mo ago
i cant reproduce it
No description
Chris Bolson
Chris Bolson17mo ago
nor can I Not related to the issue but I would recommend that you use a button for the hamburger icon and that you make the clickable area much larger. (I realize that it may just be like this for your quick demo)
Tiger tan
Tiger tanOP17mo ago
maybe its to do with the device, i have s23 ulta and the nav is 2x wider then all the other elements when i open it there
ἔρως
ἔρως17mo ago
try it on another device
Tiger tan
Tiger tanOP17mo ago
i just tried with inspect element and different device, same result for most device it only worked fine on the ipad pro and air
Tiger tan
Tiger tanOP17mo ago
No description
Tiger tan
Tiger tanOP17mo ago
and also the zenboon fold im also using lenis, gsap and split type, can those cause any problem? yh i fixed that now, thanks for letting me know tho
ἔρως
ἔρως17mo ago
if it happens to you but not us, when we try the same thing, then the missing content is the cause
Tiger tan
Tiger tanOP17mo ago
yh that makes sense but i dont see why the other content down make the nav bar grow ill just send over all the css just in case someone see anything there
ἔρως
ἔρως17mo ago
we're not computers, we can't do much with 12kb of css even computers can't do anything because it requires html to be useful
Tiger tan
Tiger tanOP17mo ago
ik i just put it there just in case someone sees something

Did you find this page helpful?