2 ms·
Yes, this is the correct solution. Which underlines the original point, that CSS is a hodgepodge of different ideas with no overarching system behind them. A s
by meindnoch 2y ago
Yes, this is the correct solution.
Which underlines the original point, that CSS is a hodgepodge of different ideas with no overarching system behind them. A simple task like this needed 3 different positioning systems:
1. flexbox for positioning the middle item
2. absolute positioning for left/right
3. and the translateY(-50%) trick for vertically positioning the absolute positioned items
- qazxcvbnm 2y agoTouché. Indeed, CSS forces one to recognise layouts that may not conform to a layout 'flow' in boxes. In its defence, I suppose recognising this is important, as to make potential box overlaps explicit (which is typically unwanted). CSS also handles a whole lot of things other than layout, which I'm not well informed of layout constraint systems being able to handle. Being a hodgepodge is an advantage, comparable to how its a great advantage that one can invoke any hodgepodge systems task from bash, as one single tool.