How to make content/div vertically middle align without absolute, tablecell and height
Shailesh Kumar
Hi team,
How to make content/div vertically middle align without absolute, tablecell and height? No matter how outer div are longer in height but my content and div should be middle align vertically.
Please provide me some better solution.
0
0
Pushpendra
10th July 2017
Hi Shailesh,
you can make content/div vertically middle align by using css mentioned below :
.center-content {
/* Anything inside me will be vertically centered */
display: flex;
flex-direction: column;
justify-content: center;
height:/* whatever you want */;
}
--
Pushpendra Singh
Shailesh
24-07-2017 00:00Hi Pushpendra, Thanks for sharing the code but i do not want to add height. Please any solution without the height?
Write a comment ...
Post comment
Cancel
Please rotate your device
We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site