• Resolved wegerl

    (@wegerl)


    Hello, with long headings it can happen that they reach to the right margin and then wrap one or two words. However, this does not comply with the conventions for headings.

    This ticket refers to the thread Heading with line break, and the following solution is more practical.

    Headings cannot simply be wrapped without causing problems for the table of contents. This should therefore be implemented using CSS, as follows:

    /* --- Heading with line break --- */
    
    @media (min-width: 700px) {
        .long-heading {
            white-space: nowrap;
        }
    }
    

    CSS-Media-Query @media (min-width: 700px) ensures that this class is only used on screens with a minimum width of 700 pixels.

    An example in HTML could look like this:

    <h2 class="long-heading">If headings are long,<span class="nowrap">they reach the right margin</span></h2>

    Headings that are to be wrapped are assigned the class long-heading, while the parts that are to be wrapped are marked within a span tag with the class nowrap.

    The direct solution in HTML may no longer be ideal after a theme change. In such cases, the customizations should be checked and adjusted if necessary.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Magazine3

    (@magazine3)

    Hi, thank you for reaching out to us regarding your concern. Could you please confirm whether you are still facing this issue? If yes, kindly share the URL with us so we can check.

    Thread Starter wegerl

    (@wegerl)

    Hello, I would like to apologize for the error in the previous CSS code. Here is the corrected version, which now works flawlessly:

    /* --- Heading with line break --- */

    @media (min-width: 700px) {
    .long-heading .nowrap {
    white-space: nowrap;
    }
    }

    And here is the corresponding HTML:

    <h2 class="long-heading">If headings are long, <span class="nowrap">they reach the right margin</span></h2>

    Best regards

    Plugin Author Magazine3

    (@magazine3)

    Hi, thanks for letting us know. We recommend updating the plugin to our latest version, 2.0.68.1. If you face any issues, please let us know.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Heading with line break’ is closed to new replies.