I am currently working on designing a side bar that will feature buttons and other elements with text on the opposite side. Initially, when you open the page, the sidebar occupies 39% of the left side, which is functioning correctly. However, when zooming in, the sidebar should decrease in width, and when zooming out, it should increase in width. The issue arises when zooming in from the original browser position as the sidebar ends up extending too much to the right. Conversely, when zooming out, the sidebar shifts excessively to the left.
In essence, I want the sidebar to maintain its initial appearance as shown here: (View how it should always look)
Regardless of whether you are zooming in or out, it should preserve this original proportion. Nevertheless, when you zoom out, it appears like this: (View when zoomed out)
And when you zoom in, it looks like this: (View when zoomed in)
To address this, I require a solution involving code that adjusts the margin size by increasing it when zooming out and decreasing it when zooming in.
I apologize if this seems trivial. Thank you for your assistance!