Force local CSS

Hello guys,

Is there a line I can add into my script to force applying the local html CSS and ignoring any other CSS such as wordpress theme CSS!!

In other words, the script I have is working perfectly (Thanks to Paul) but my theme CSS is doing something to make it stop functioning :frowning:

Then use higher priority CSS rules in your local file.

Oh that is difficult thing to do because I don’t know what exactly affecting the script to use higher priority CSS rules

You can find out where rules for an element are coming from using your browser’s dev tools.

Have you got a link to a page where we can see this in action?

Hi,

Thanks for PMing me the site details.

The problem can be seen in your browser’s dev tools:

SyntaxError: expected expression, got '<'[Learn More]
logistics:547:3

A look at the offending code shows:

<p><script type="text/javascript">
if (!Array.from) {
    Array.from = function (els) {
        return Array.prototype.splice.call(els, 0);
    };
}
...
showCheckboxValues({
    cases: document.querySelector("#cases"),
    checkboxes: document.querySelectorAll("input[type=checkbox]"),
    targetField: document.querySelector("#PackageRef02")
});</p>
<p>	</script><br />

Notice those <p> tags within the <script> block? I would strongly suspect that is what is causing your problem.

1 Like

Wow I can see that now, so the theme is forcing <p> to the script

Now I need to think of something to remove those.

Awesomeeeeeeeeeeeeeeee Pullo thank you very much

No probs. This is a well-know problem:

2 Likes

You made my day sir, I will check that right away and do the fix
Thank you big time :gift:

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.