I set the apex:page parameter standardStylesheets="false". But some stylesheets are still being loaded and affecting display, such as common.css:
How do I prevent them from loading?
I set the apex:page parameter standardStylesheets="false". But some stylesheets are still being loaded and affecting display, such as common.css:
How do I prevent them from loading?
You can also try to set sidebar="false"
and showHeader="false"
with standardStyleSheets="false"
in apex:page
. This will show up a balnk page and it will a plain HTML page without any standard style of salesforce.
Found a solution. I don't think we need the CSS, so I disabled it on page load, as per this article: https://stackoverflow.com/questions/12857734/removing-the-css-file. You can also remove it entirely with .remove().
Luckily, all the CSS files are being loaded via tag, which all have the class "user":
$("link.user").each(function(){
$(this).attr("disabled", "disabled");
});
I just ran into the same problem tonight. My set up was that my page called a template via <apex:composition>
. My page had the relevant sidebar
and showHeader
and standardStyleSheets
all set to false
, but common.css
was still getting included.
The resolution was to set all of the above parameters to false in the page template as well as the page you're calling the template in, as the template is a page too.