[Resolved] How to add padding on the left and right of the title in mobile

Home Forums Support [Resolved] How to add padding on the left and right of the title in mobile

Home Forums Support How to add padding on the left and right of the title in mobile

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1430189
    Shami

    I’ve edited the theme files to put the blog post title outside the page container.

    It looks fine on desktop. But sometimes, in mobile, the padding seems to be missing on the left and right side. The title touches the container on the left and right. This happens only in mobile.

    How do I add padding?

    Please note that I’ve tweaked the files to display title above the page container. Normally, padding can easily be added in the customization settings. But this case is different.

    #1430431
    David
    Staff
    Customer Support

    Hi there,

    you should never edit the Theme files – any changes you make to them will be lost when the theme is updated.

    If you want o place the Title outside of the container then use a Header Element instead:

    https://docs.generatepress.com/article/header-element-overview/

    You can add the <h1>{{post_title}}</h1> template tag to the header element to dynamically display the current post title. It will also automatically remove the title in the content.

    #1430579
    Shami

    Figured it out. Thanks

    #1430666
    David
    Staff
    Customer Support

    Glad to hear that

    #1430931
    Shami

    Also, it looks like loading time has improved. I guess those css and code in functions.php were affecting the loading speed. Is it true? Do those little code snippets affect loading time?

    #1430983
    Leo
    Staff
    Customer Support

    It could be but should be minimal if there is only a little bit of code.

    Tough for us to tell.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.