Streaming live at 10am (PST)

How can I make my Navbar's margins change as the page is resized?

Hi everyone. I’m trying to achieve a similar effect to the Slack website, where the navigation bar margins seem to decrease incrementally as the browser window size decreases. I’ve uploaded a screen recording here:

Here’s a read-only link to the website I’m working on. Right now the desktop display is my only focus.

Does anyone have any ideas that could help me out? Thanks in advance!

hi @Kiwi1 it is max-width of page content that is set on page content container.
under body element add div add class to it let say main and set its max-width for example to 1440px and position centre this mean set of left and right margin to auto .
This defined max-width prevent page content grow over this point when page is displayed on large screens.

You can take some CSS course to learn how things works and visit WU to learn how to work with this platform.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.