Blank spaces before content in HTML files

PennController for IBEX Forums Support Blank spaces before content in HTML files

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8118
    Cascade
    Participant

    Hello, I’m having an issue with an HTML file’s body being preceded by many lines of blank spaces, and I’m not sure what’s causing it. We have a good amount of CSS specified before the body tag, but I don’t know why that would push it down so far. Any ideas why this might be happening? It seems to happen for both Message & Form controllers.

    Best,
    Jack

    #8119
    Jeremy
    Keymaster

    Hi Jack,

    It’s a little hard to tell out of context. Do you have a link to your experiment that you could share, here or at support@pcibex.net?

    Jeremy

    #8122
    Cascade
    Participant

    Yes, this link should work: https://farm.pcibex.net/p/BjgaAp/

    All the options are obligatory, so you have to click on the button on the first page, then click “continue” on the second…the third page is where the issue is.

    https://farm.pcibex.net/p/BjgaAp/

    Thanks,
    Jack

    #8123
    Jeremy
    Keymaster

    Hi Jack,

    I would recommend reserving the data-collection link for actual participants, otherwise you might end up with noise submissions from test runs mixed in with valuable submissions from actual participants. The recommended link to share is the demonstration link, which comes with the debugger and a link to edit a copy of the project, which I need to troubleshoot issues. I did look up the database and fetched the demonstration for your project, but you might want to edit your message to not circulate the data collection link

    Regarding the formatting issues, it’s coming from the fact that your HTML document is written as a standalone document, whereas it is actually injected as a part of another document when you include it in your experiment. More specifically, your HTML document contains a body node and applies CSS rules to all h1, header, p, div, etc. nodes in the document, which will necessarily also target those outside your HTML document, ie. including the nodes introduced by IBEX and PCIbex

    What you can do is delete the first 5 lines of your HTML document (from <!DOCTYPE html> through <title>Passage One</title>) as well </html> at the very end. Then replace <body> with <div class="thisDocument"> and </body> at the end with </div>. Finally, prepend every selector in the CSS rules with .thisDocument, eg replace h1 { font-size: 2em; } with .thisDocument h1 { font-size: 2em; } and h2, h3, h4 { font-size: 1.5em; } with .thisDocument h2, .thisDocument h3, .thisDocument h4 { font-size: 1.5em; }, etc. Also make sure to replace body { with .thisDocument { in those rules

    You should be good once you proceed to those edits

    Jeremy

    #8136
    Cascade
    Participant

    Thanks!

    Jack

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