Considering the various screen sizes available today, we must build UIs that can adapt gracefully to any width and height. Sometimes it is possible to have one layout with rules on how that should change based on the width and height of the screen. Other times, we may need to build different layouts for big and small displays. In other words, layouts must be responsive.
There are different mechanisms to achieve layout responsiveness. One of the most popular available on both the web and mobile devices is the FlexBox. Its official documentation for browsers (web apps) is available here:
But there is also an interactive guide that makes it more fun to play with and understand the concepts behind FlexBox and the tools it provides, even for very complex UI layouts: