0
What's the best way to center a div both horizontally and vertically using css?
I've always found many solutions but the most of them never worked for me or they not totally satisfy my needs :/
3 Respostas
0
horizontal-align and vertical-align do not satisfy you? maybe try with margin="auto" too but for the upper div
0
Well, I have no problem in center an element horizontally, but I always find difficult to center it vertically because 90% of times I use vertical-align it doesn't work. In my last code, for example, I had to modify paddings.
That's why I'm asking.
0
If i remember correctly if you set the line spacing to = the height of the parent div that might work. Apologies if it doesn't