VW not working properly

vw is functioning like an absolute unit. I am trying to create a responsive navbar nd using vw as margin unit but it is functioning like an absolute unit nd I had to put media queries to fix the prob. https://codepen.io/RS_2009/pen/jOpqEqV?editors=1000
Rishit
CodePen
Navbar
...
7 Replies
rishit
rishitOP2y ago
sm1 help
Mannix
Mannix2y ago
what is your desired outcome?
rishit
rishitOP2y ago
it is not working responsively and there is white space between media queries
Mannix
Mannix2y ago
where you want your ul to be at all times? the css you use is doing what you told it to do what is your idea of "responsively"?
rishit
rishitOP2y ago
There is white space on the right nd i wud hv to put infinite media queries to make it work on all screen sizes there is 2 much white space on the right on larger screen sizes right
Mannix
Mannix2y ago
then instead of left:45vw just use right: 0 no need for media queries also don't set fixed width and height on things unless you really have to. Second use padding to create space between your li elements
rishit
rishitOP2y ago
tysm
Want results from more Discord servers?
Add your server