4 ms·
I dare you to make a website using only css position: absolute; Make it work on different screen sizes. Do independent scrolling. It'll be hell very quickly. Ne
by alvarlagerlof 6y ago
I dare you to make a website using only css position: absolute; Make it work on different screen sizes. Do independent scrolling. It'll be hell very quickly. Nesting is used in all somewhat complicated layouts.
- dsego 6y agoHow about with css grid?
- nyanpasu64 6y agoWin32/MFC dialog layouts are based off absolute positioning of all widgets, with a few concessions to resizability (like the ability to select whether a widget moves down or stay still when a window gets taller). This is the reason why many dialogs, like Run, or Windows Explorer file properties, cannot be resized. Any hierarchy (group boxes holding widgets) is purely visual, and the rectangle doesn't "own" its child widgets in a programmatic sense. Text widgets have a fixed size. If your font gets wider (from DPI scaling or translations), text can become cut off or overflow onto the next line and disappear.
- gitgud 6y agoThis demonstrates the main advantage of a tree structure, which is relativity. You can say that all nodes on this leaf of the tree are contained within that node... It's an elegant way to describe a UI in my opinion.