Align Text In Text Box

  1. 8 years ago

    I am interested in aligning text within a text box for a Pub Coder template. In this case, I'd like to align the text vertically within an established guideline text box. See attached image: Is there a way to do this?-image-

    Thanks!

  2. -image-

  3. Giancarlo N

    27 Jan 2016 Administrator

    It seems your dropbox link is private so we cannot see your screenshot.
    About text alignment, the text editor has this feature, so that you can align text in each text box as you want. In addition, if for example you would like to center align all the text in all the text ojbect, you firstly have to select all text objects, then select the corresponding icon -image-

  4. Angelo S

    27 Jan 2016 Administrator

    Hi Natalie,
    vertical alignment is a little bit tricky in HTML/CSS, you need a little bit of custom CSS to achieve this.
    First, make sure your text is made up of a single paragraph (instead you can insert line breaks by hitting shift + return.)
    Close the text editor and go to the CSS Styles panel in the Project Settings. Paste this code at the bottom and close the window.

    .SCText.VerticalCenter {
        display: table;
    }
    .SCText.VerticalCenter > * {
        display: table-cell;
        vertical-align: middle;
    }

    Now select the text object and, in the inspector panel, insert "VerticalCenter" in the CSS Classes property.
    Your text should be vertically centered now.

    Bye,
    Angelo

 

or Sign Up to reply!