Question about responsive from beginner

Hello everyone, I am trying to find a solution regarding resizing browsers and html and css code. For example, I want to make it so that when I resize browsers, the white space on both sides shrinks. As an example, I’m giving the first link showing the space collapse, and the second link is the page I want to edit. I tried with with @Media min width but it is not happening.
Note: When the browser is open in full screen there is a blank space by default( I am using padding-left: 350px; padding-right: 350px;), that’s just how I want it to look. Just want to remove this white space when i resizing the browser.

Example work:

Example doesn’t work:

You can get this by setting a max-width for the main content container, the centre it using auto margins on either side.


Thank you so much, ill try soon,