FANDOM


  • This came up from one of our wikia editors who does the translation for the German version of our Wikia. 

    The English version: https://habitica.fandom.com/wiki/Sample_Habits : The red and white box for  "Call Clients/Put Off Phone Calls" has the +1 | -10 line perfectly lined up.  It uses the template https://habitica.fandom.com/wiki/Template:Task.

    The German version: https://habitica.fandom.com/de/wiki/Beispiele_f%C3%BCr_Gewohnheiten - If you scroll down to the red and white box for "Kunden anrufen/Anrufe aufschieben", you'll see that the +1 | -10 entries are offset on different lines.   We've copied the task template to the German Wiki verbatim, and the call lines to it in the Sample Habits topic are the same, but the formatting doesn't work.

    Any clue on what we're missing would be helpful. 

    Best regards,

    Taldin (talk) 18:33, September 18, 2019 (UTC)

      Loading editor
    • Something is causing the span tags to become mismatched. The odd thing is, I can't tell what it is. As you stated, the templates have been copied verbatim and all of the surrounding HTML appears to be correct. It is literally only when you get to those span tags that something goes wrong.


      Edit:

      Does not appear to be any site CSS/JS differences and when I copy-and-paste the English content onto the German wiki, I get the same display issue. I would suggest contacting staff at this point. Be sure to include a link to this thread.

        Loading editor
    • Thank you for trying -- we've tried a number of things ourselves and finally our local admin said to take it up a level, and I thought this was the top level. :D

        Loading editor
    • This isn't the top level, but it is the next level up. What I am saying is I think you need to take it yet another level up; to the highest level possible.

        Loading editor
    • This was due to extra line feeds in Task-content (line feeds force a <p> element)... I fixed it here.

        Loading editor
    • Interesting. So a single linefeed forces the closing of the span tag even though it usually takes a double linefeed to force a new line? Good to know.

        Loading editor
    • I guess you can say the span was force closed. The line feed forces a <p> within the <span> which has its own set margins. This ends up disrupting the span tag.

        Loading editor
    • I'm not savvy enough on CSS to understand why that was a problem, but maybe it'll make more sense when I look at it later today.  I have class to get to now, but I wanted to say thank you!

        Loading editor
    • A <p> tag is a "paragraph" tag in HTML. Basically, the extra line break told MediaWiki (the software running Fandom) to add a paragraph. Paragraphs automatically add in a top and bottom margin as to separate itself from the paragraph before and/or the next (or the element directly above or below the paragraph). IE: if I use the code <p>Paragraph 1</p><p>Paragraph 2</p> even though they are on the same line, MediaWiki converts that into this: 

      Paragraph 1

      Paragraph 2

      That extra "padding" disrupts the flow of those numbers being on the same "line" as the first number had that padding and the second number did not.

        Loading editor
    • Aha!   So what was happening is that because the code was on separate lines (possibly from the copy/paste) it was invisibly adding

      tags that the original didn't have?

        Loading editor
    • Yep. That was my assumption.

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.