We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7810
    • 26 Posts
    Hello,
    I allways get an additional blank line before Ditto template output. There are no spaces nor lines in my Ditto templates and page templates. How should I get rid of those spaces? They are messing my page layout. Do I need to edit the Snippet itself? Could anyone give me a direction, please?

    I’m using Ditto 2.1.0 with MODx Evolution 1.0.2.
      MODx is great! Thanks for great work!

      Portfolio, mostly MODx: dbdizainas.lt
      • 3749
      • 24,544 Posts
      Do you have Rich Text on for the documents? TinyMCE may be tossing in an extra <p>.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 7810
        • 26 Posts
        Tried to turn off Rich text, but still the same. However there are no additional <p> elements. Added a screenshot of Firebug.
          MODx is great! Thanks for great work!

          Portfolio, mostly MODx: dbdizainas.lt
          • 3749
          • 24,544 Posts
          Is there a padding or margin setting in the CSS file for entry or hr?

          Firebug should show you where the space is coming from if you click on the Inspect button (little window and arrow at the upper left of the Firebug window) and then on that area.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 7810
            • 26 Posts
            Yes, I know that. With or without the marging or padding the space is still there. It’s in the source, markup has no effect on it. I’ve been having this same problem on more MODx based projects.
              MODx is great! Thanks for great work!

              Portfolio, mostly MODx: dbdizainas.lt
              • 7231
              • 4,205 Posts
              I am pretty sure that Ditto does not add a space by default (I find myself having to add a return to avoid getting </div><div> at the end of every tpl iteration).

              My suggestion is that there is a return in your tpl or template that you are not seeing. These sometimes get carried over from editors when dong a copy paste. Copy your markup into an editor and tell it to show hidden characters and you will most likely see a return that was invisible.
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don&#39;t know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 7810
                • 26 Posts
                Nope, there are no invisible returns in templates (screenshots added).
                I’m using different Ditto calls with different templates, both copy-pasted and hand-written, but I allways get the additional space.
                Thank You for Your quick replies!
                  MODx is great! Thanks for great work!

                  Portfolio, mostly MODx: dbdizainas.lt