0

I found that adding an InfoPath form web part to a page broke a lot of the custom branding we have added to our site. Inspecting the html, I noticed that a second reference to core.css had been added at the very end of the element, and after references to our custom CSS files.

1

In my case, the copy of the core.css that I wanted to keep actually included a querystring (core.css?somerandomlookinglettersandnumbers) so I simply disabled the offending core.css stylesheet as follows:

<script type="text/javascript">
    for (i = 0; i < document.styleSheets.length; i++) {
        var currSheet = document.styleSheets[i];
        var compString = "/_layouts/1033/styles/core.css";
        var longCompString = "http://" + window.location.host + compString;
        if (currSheet.href == compString || currSheet.href == longCompString)
        {
            currSheet.disabled = true;
        }
    }
</script>

I created a new page layout for InfoPath forms and added this script at the very end of the tag (i.e. just before the closing tag for this section)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.