• hello guys
    i have a problem in my post pages.people can scroll to left alot even behind the theme.there is just empty space but with a text and link in it.its alot div tags.
    so when people enter a post page they have to scroll to right to see the content.
    some screenshot
    https://pasteboard.co/IhV4ai6.png

    the text at the end of the page(left side)
    https://pasteboard.co/IhV4ImP.png

    screenshot of the problems div tags that must be deleted
    https://pasteboard.co/IhV51aL.png

    i dont know where are this extra tags located and i dont know how to remove it
    if is there anyway to fix this please help me .thanks

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You’re using a commercial theme/plugin, so please use their official support channel. We feel they are best equipped to support their products.

    https://themeforest.net/item/gridlove-creative-grid-style-news-magazine-wordpress-theme/17990371

    Commercial products are not supported in these forums.

    It’s definitely those extra DIVs that are pushing the left edge out, because they have an inline style setting the left border to -9999px. Are you sure it’s not a plugin that is causing the problem? I would be very surprised if the theme was putting those DIVs in there. Try deactivating all of your plugins and see if the problem goes away.

    If you can’t find a plugin that’s putting in those extra DIVs, you may be able to remove them by adding some Javascript.

    Never mind, I think I found a CSS solution for you. Try adding this rule in your custom CSS (Appearance → Customize → Additional CSS):

    body.single-post {
       overflow-x: hidden;
    }

    This should hide those extra DIVs.

    Thread Starter irsalvatore

    (@irsalvatore)

    ty i think it worked @crouchingbruin

    Thread Starter irsalvatore

    (@irsalvatore)

    mobile visitors still have the problem
    there must be a way to remove unwated html tags
    i dont know how

    Did you try deactivating all of your plugins to see if the problem goes away?

    And can you also try modifying the rule so it looks like this:

    body.single-post {
       overflow-x: hidden !important;
    }

    If you cannot find a plugin that is causing the extra tags, you can use this piece of code to remove them.

    <script>
    jQuery(document).ready(function( $ ){
       $("div").each( function(index) {
          strLeft = $(this).css("left");
          if (strLeft.indexOf("-9999") != -1) {
             $(this).remove();
          }
       });
    });
    </script>

    You will need to add the code using a plugin that will insert the code into the <head> section of your pages. I recommend either Simple Custom CSS and JS or Header and Footer Post Injections. If you use the first plugin, you can remove the <script> and </script> tags from the example above, because that plugin will automatically insert them.

    What the code does is scan through all DIVs and look for the ones which have the left CSS property set to -9999, which is what those DIVs have. When it finds one, then it gets removed. I’m hoping those DIVs have the same property value of -9999 under mobile as they do in the desktop browser, otherwise the code won’t work.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘html problem’ is closed to new replies.