Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Css line code appearing on the toolbar of my website, Please Help!

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #248843
    Zeelous
    Participant

    Hello, there is a line of code that I entered into my site’s css showing on my site (in the top left corner) when I resize my computers web browser to it’s smallest possible size and also when I view the site on my smart phone. The line code is };

    I only don’t see it when I’m viewing the website as an Admin!

    Website: https://zeelous.com

    Thanks in advance!

    #248844
    Beverleyh
    Participant

    You have a lot of CSS snippets scattered throughout the HTML (probably what’s causing the issue here). You should move them to the correct place – either inside a stylesheet or into the head section.

    #248845
    Shikkediel
    Participant

    Yep, that’s not allowed – and scoped, which would make it valid, got removed from the spec this year. But there’s a stray character (and tag) causing this specific issue:

    #248846
    Zeelous
    Participant

    Hello guys, thank you so much for your quick replies i really appreciate it. But unfortunately I’m not familiar with programming and all this stuff! I wish you could still help me solve this issue.

    Actually I’m using Shopify as a website builder, and I have this code in header.liquid:
    <style>
    .site-header__logo img {
    max-width: {{section.settings.logo_max_width | default: ‘180’ | remove: ‘px’ | append: ‘px’}};
    }
    </style>

    Someone told me that i’m forcing styling the element under the header.liquid under sections at the very top but i did not understand what that means.

    #248847
    I.m.learning
    Participant

    Shikkediel showed the extra }; in your code.

    #248853
    Shikkediel
    Participant

    Someone told me that i’m forcing styling the element under the header.liquid under sections at the very top but i did not understand what that means.

    I think it is the same as Beverleyh mentioned, &lt;style&gt;&lt;/style&gt; tags are only valid inside the &lt;head&gt;&lt;/head&gt; section of the document. If you go to your page, right click and choose “view source” (or something similar) then you’ll see that there are styles inside body. That’s not correct HTML but modern browsers are usually smart enough to cope with it.

    To solve the issue of the character showing up, you’ll have to find a way to purge it from the document…

    #248855
    Senff
    Participant

    The Google Tag manager code (that Shikkediel posted above) contains a &lt;script&gt; within the &lt;script&gt;, that’s pretty much where things went wrong.

    #248856
    Shikkediel
    Participant

    Ah yes, you are right. It’s not the bracket and second closing tag that are abundant but the earlier script tag is the culprit. Well caught.

    a stray character (and tag)

    #248871
    Zeelous
    Participant

    Hi everyone, thank you so much for your help, it worked!!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘CSS’ is closed to new topics and replies.