Text Indent

  • Unknown's avatar

    I would like to be able to apply hanging indent to lines of verse that is responsive to screen size. I would like to write, for example:

    an apple
    on a tree
    fell
    to the ground

    so the line breaks and indents remain the same on a mobile or a laptop screen. I do not want to use the preformatted block because the background goes grey. Is it possible with the paragraph style or markdown or any other way?

  • Unknown's avatar

    There’s a problem with the question too. I want “on a tree” to begin in the next line where “an apple” leaves off in the first, as if “on a tree” had dropped to the second line from where it would have been in the first. Help?

  • Hi there,

    For what site is this? The only site in your account, https://typewritersandviolins.wordpress.com/, is completely empty and hasn’t been updated since 2014. If you’re using the open source WordPress software at another host, the WordPress.org forums are a better place to get help:

    https://wordpress.org/support/forums/

    That said, the only way to preserve spacing is using the preformatted or the verse block.

    Verse Block

    HTML doesn’t like empty space, so your spaces being stripped out is caused by how HTML itself works, and has nothing directly to do with the editor. The pre HTML tag, which stands for “preformatted” was developed as a way to make an exception to this.

    Without the pre tag, the only way to add indents in HTML is to style that using a different type of code, called CSS, and while it’s possible to style individual lines of text, it’s fairly complicated, and not something I can easily explain to you how to do in a forum thread :)

    The preformatted block is typically styled to have a grey background, but many WordPress themes don’t add a background to the verse block, so try using that instead. And even if a background is added, if you’re using the open source version of WordPress you can just change that by adding custom CSS code to your theme. You can contact support for the theme you’re using directly for help with that.

  • Unknown's avatar

    It is for typewritersandviolins.wordpress.com. I emptied it a few days ago to start over.

    Thanks for your answer. I’ve tried indenting in CSS but I’m inadequately competent for that. I will try changing the background colour. Apart from the colour, however, the preformatted block also scrolls from side to side. I will try reducing the margins and get back to you if that does not work. Thanks a bunch.

  • The topic ‘Text Indent’ is closed to new replies.