CSS Vertical Alignment

Status
Not open for further replies.

FocuZst

New Member
Jan 16, 2015
26
6
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
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%);
}
 
Status
Not open for further replies.

Users who are viewing this thread

Top