Shift text to middle of page

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • In Progress
How do you shift text to the middle of the page instead of everything defaulting to the left side?
Photo of Stephony (DBH)

Stephony (DBH)

  • 586 Points 500 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
The way the css (cascading style sheet) is set in QB you can't make things center aligned..., but you can increase the left margin so the sections appear to be more centered.

It takes using the IOL ans some custom code.

A native solution, that is messy, and hard to maintain, it to insert text elements on every row of your form, to basically push everything to the right.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,006 Points 50k badge 2x thumb
If there is just 1 field that you want centered on a page like a page heading, you can do this.

var text Words = [my text field];

"<u><b><div align=\"center\">" & $Words & "</div>"

That would center and bold and underline.
Photo of Johnny QuickBase

Johnny QuickBase

  • 300 Points 250 badge 2x thumb
Stephony,  I wanted to have columns on a form with gaps between the fields, and wasn't sure how to do it with coding.   I did this in the customize form settings

In elements I did the following.

Inserted a Text field,    (this is not a new field you create, but an option just like a section heading.  See screenshot.

Leave the Text Item Properties blank.
The field that You want  displayed after the blank text click the check box for Same Row.  
This will push the field over from the left.  It's not exactly centered, but it isn't all the way to the left.  You can add a couple of these blank text if you want it further over.

You can also do this if you want a gap between 2 fields on the same row.  Insert text in between the two fields you want to create a gap.   Just be sure to click the checkbox for Same row on the first field, the text field and your second field.

Doing this saved a lot of scrolling up and down on some of my forms, and makes it look cleaner somtimes than just having two fields side by side.