How to set vertical align middle div by CSS in HTML?
If you want to set vertical align middle text, image, div etc then you can set easily by using following example. you can give vertical align middle by saveral way. i also give you example with output. you use any of the example of vertical align middle by css. I also provide saveral example with difference css so you can easily find your solution.
In this example you can set vertical align middle using display:table and display:table-cell property of css.
width: 500px;background:green;color:white;height: 150px;border:1px solid red;display: table;
display: table-cell; vertical-align: middle;
border:1px solid green; width: 50px; height: 50px; margin: auto;