html - CSS text on the middle of div (div height:20%) -


<style> ._1{   height:20%;   width:100%;   overflow:hidden;   white-space:nowrap;   text-overflow:ellipsis; } </style> <div class="_1">content</div> 

how make content align @ middle of div? thanks. demo

edit: height % not px. set line-height: 20% it's not work.

   div{      height: 20%;     width: 100%;     text-align: center;     display: flex;     flex-direction: column;     flex-wrap: nowrap;     justify-content: space-around;     align-content: center;       }    

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -