Layout is broken. Css of Javascript conflict?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • matheussousuke
    New Member
    • Sep 2009
    • 249

    Layout is broken. Css of Javascript conflict?

    Hi, I have this website that works just fine in Chrome and Firefox, I used Chrome and Ie consoles to check for Javascript errors, couldn't find anything.

    Check the attachments, one is Ie's image and the other is Firefox's.

    As you can see, the layout is broken in Ie.

    You can go the page and see it by yourself (Internet Explorer 8):

    forum.mghospeda gem.com


    Thx in advance


    - EDIT -
    Just updating. Another snapshot from ie 8 (Attached).
    Attached Files
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    Whenever there is anything at all before the doctype, IE goes into quirks mode. Put that script stuff into the head where it belongs and that should fix it.

    Comment

    • matheussousuke
      New Member
      • Sep 2009
      • 249

      #3
      I'm realllly sorry for asking you about that, no offense, but can you be more clear?

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        Your very first line starts with a script tag and continues on for several lines until it hits the doctype 18 lines down. None of that can be in there cause it makes IE go into quirks, thus breaking the layout.

        Scripts are to be in the <head> of the document but this part is outside the document.

        Comment

        • matheussousuke
          New Member
          • Sep 2009
          • 249

          #5
          Awwwn, I get you now, you're talking about the Google analytics script, right?

          Comment

          • drhowarddrfine
            Recognized Expert Expert
            • Sep 2006
            • 7434

            #6
            Yep .
            Actually, Google wants you to put it right before the closing body tag.

            Comment

            • matheussousuke
              New Member
              • Sep 2009
              • 249

              #7
              I did it now, but I'm getting parse errors.

              The html part is called by php echo, so, even if I put it here

              Code:
              }
              
              function template_html_below()
              {
              	global $context, $settings, $options, $scripturl, $txt, $modSettings;
              
              	echo '
              </body></html>';
              }
              Before the </body> tag, it will give me errors.

              Comment

              • drhowarddrfine
                Recognized Expert Expert
                • Sep 2006
                • 7434

                #8
                From javascript or PHP? In either case, that question's for a different board.

                Comment

                • matheussousuke
                  New Member
                  • Sep 2009
                  • 249

                  #9
                  No worries, I solved it, downloaded a footer plugin and put the code on it. Thx for the great help.

                  I just wanted to know what was making the layout break.

                  I'll choose one of your answers as the best.

                  See ya

                  Comment

                  Working...