Support » Theme: OceanWP » Content on 404-page not centered

  • Resolved yesiamroot

    (@yesiamroot)


    Hello & good evening,
    I am too dumb to find the reason as to why the content of my 404 page is shifted to the right. Everything else is fine, blog page, single pages, posts, everything. Just the 404 keeps on troublig me. I am using an elementor template but the same issue persists with the Oceanwp default 404 setting. Any ideas where to look? I tried all settings in the customizer but to no avail.

    The problem is evident under the following link: https://mybanto.de/idonotexist

    I wish you all a merry Christmas and may the force be with you.

    Andreas

    • This topic was modified 6 months, 2 weeks ago by yesiamroot.
    • This topic was modified 6 months, 2 weeks ago by yesiamroot.
    • This topic was modified 6 months, 2 weeks ago by yesiamroot.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • ok, I found the reason: the culprit is a set of three CSS instructions that sets the width of the left and right sidebar separately:
    ———-
    #1. aside#left-sidebar {width: 19%; left: -57%;}
    #2. div#primary { width: 57%; left: 19%;}
    #3. aside#right-sidebar {width: 24%;}
    ———-
    The CSS works fine on all pages except the 404 page. This is probably bc the 404 page has no sidebars and therefore instruction #2 causes the content to be displaced. I could live with both, either “switching on” both sidebars on the 404 page or dedicatedly disabling the CSS for the 404-page.

    Andreas

    Found a solution, that works for me. May it be of help to someone else (not sure though if this is a non-permissible hack).
    1. Copied 404.php from oceanwp theme folder to to my child theme folder.
    2. Changed line 57 to <div id=”primary” class=”content-area clr my404error”>
    3. Changed CSS to
    div:not(.my404error)#primary {
    width: 57%;
    left: 19%;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Content on 404-page not centered’ is closed to new replies.