Is there a way to center or right justify text in a text field?

  • 1
  • 1
  • Question
  • Updated 1 year ago
  • Answered
Hi! Is there a way to center or right justify text in a text field? Would I use some type of text-formula? Any insight would be greatly appreciated!
Photo of Thomas Ross

Thomas Ross

  • 70 Points

Posted 2 years ago

  • 1
  • 1
Here is what I have to put a field called Last Name in a coloured box and justify it to center.
Its a formula text field. The first part gives you whatever you want to put in the styling variable and the second part puts it together with the original field.

var text styling = "box-sizing: border-box;  font-size: 12pt; width:150px; text-align:center; padding-top: 15px; color:white;background-color:blue; position: relative; height: 50px;"; 

"<div style='" & $styling & "'>" & [Last Name] & "</div>"
Photo of Mallory

Mallory

  • 12 Points
how do you type this into the formula box?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,904 Points 50k badge 2x thumb
You just copy and paste that into a Rich text formula field type.