Forum Discussion

Stephony_DBH_'s avatar
Stephony_DBH_
Qrew Cadet
7 years ago

Shift text to middle of page

How do you shift text to the middle of the page instead of everything defaulting to the left side?

3 Replies

  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    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.
  • 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.
  • 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.