FocuZst New Member Jan 16, 2015 26 6 Jan 30, 2015 #1 I've been trying to search how to vertically align text inside a division and I have had no luck. Anyone have an idea of how to do it?
I've been trying to search how to vertically align text inside a division and I have had no luck. Anyone have an idea of how to do it?
brsy nah mang May 12, 2011 1,530 272 Jan 30, 2015 #2 Here is a little snippet that I've been using for a while. It works for everything, not just text. HTML: .vertical { position: relative; top: 50%; transform: translateY(-50%); } Upvote 0 Downvote
Here is a little snippet that I've been using for a while. It works for everything, not just text. HTML: .vertical { position: relative; top: 50%; transform: translateY(-50%); }
FocuZst New Member Jan 16, 2015 26 6 Jan 30, 2015 Thread starter #3 kodeAnt said: Here is a little snippet that I've been using for a while. It works for everything, not just text. HTML: .vertical { position: relative; top: 50%; transform: translateY(-50%); } Click to expand... Awesome! Thank you very much. It worked. Upvote 0 Downvote
kodeAnt said: Here is a little snippet that I've been using for a while. It works for everything, not just text. HTML: .vertical { position: relative; top: 50%; transform: translateY(-50%); } Click to expand... Awesome! Thank you very much. It worked.