Relative to the page, horizontal alignment in CSS is easy - a margin:0 auto
gets you by much of the time, and a text-align:center
for some other cases.
My question to the gurus is not how to vertically align, but why is it so much more difficult? Why isn't there margin:auto 0
? I mean, from a programming perspective.
Theoretically, it seems like the same algorithms would apply to both types of centering.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…