Center text in a floating td
-
I haven’t used tables too many times, in fact the only times that I’ve dealt with them is with your plugin, which is fantastic by the way.
I have two columns which are floating apart from each other and I need them to have the text vertically centered on both but I can’t figure it out. I looked all through this forum and Google and the answers I find don’t seem to work for me.
my css looks like this for these tables:
td.column-1 { float: left; width: 357px; height: 140px; border: none !important; color: #2E3092; text-align: right !important; font-size: 18px; line-height: 120px; padding-right: 23px !important; } td.column-2 { float: right; width: 631px; height: 140px; padding: 20px 25px 0px 25px !important; font-size: 14px; color: #939597; } .tablepress .odd td { background-color: #e6e7e8 !important; } .tablepress .even td { background-color: #edecec !important; border: none !important; }
Any thoughts would be greatly appreciated. I’ve tried vertical-align: middle so many times to no avail, I just think I’m missing something.
P.S This is the starting code I had with line-height on the first td and padding on the second td. I don’t want to use these, I’d rather just be able to center them vertically.
- The topic ‘Center text in a floating td’ is closed to new replies.