ai-coding-minesIndexGitHub

`text-align: right` shows in getComputedStyle but the buttons don't move

Python and databases

Symptom

The button cluster in a table's action cell was off by 82px per row. text-align: right was set on the cell; getComputedStyle confirmed right. The button coordinates did not change at all.

cell computed:  text-align: right                                  <- looks applied
button x:       row0 [1475, 1558, 1674] · row1 [1393, 1518, 1634]  <- unchanged

Cause

The cell's children were <div class="d-flex ...">. text-align is a layout rule for inline content; inside a flex container, placement is decided by justify-content. text-align is inherited but never applied. getComputedStyle reports the inherited value honestly — it's just not the layout algorithm that consumes it. The check looked at the wrong layer.

Fix

justify-content: flex-end on the flex child. The buttons' right edge converged on a single value (1892).

If you don't know the structure, set bothjustify-content / align-items for flex and grid, text-align for inline flow. They don't override each other.

Verification

Verify alignment fixes by coordinates. Measure button x, right edge, and column boundary with getBoundingClientRect and confirm they converge on the same value per row. A computed-value check answers "did the declaration arrive?"; only coordinates answer "did it do anything?"

A computed value is a necessary condition, not a sufficient one. When the place you check is not the place that does the work, computed values and green checks both lie.