I am currently working on developing a web app using Bootstrap 4 as the front-end framework. The app is primarily designed for desktop use, but I have made certain views and menus adaptable to mobile devices.
However, I have encountered an issue where the app breaks at 768px and switches to the mobile view. When testing it on my Samsung Galaxy A51, I noticed that in portrait mode everything looks fine, but in landscape mode it reverts back to the desktop version, which is not what I intended.
My smartphone has a resolution of 2400 x 1080, which raises some questions for me:
- In portrait mode, I should have a width of 1080px on my phone, so why does it display the mobile version? (Although this is the desired outcome, I am unsure of how it is functioning this way)
- In landscape mode, with a width of 2400px, the desktop version is displayed, which makes sense. However, since media queries in Bootstrap are based on pixels, how can I handle this situation?
I find it puzzling that responsive design is solely determined by pixels, as screen size may vary regardless of resolution. Perhaps a combination of resolution and screen size would provide a more accurate solution.
How do you approach responsive design in your projects? What methods do you find most effective for ensuring adaptability across mobile and tablet devices?
Thank you for any insights or guidance you can provide.