[SalesForce] Override salesforce styles on Visualforce page

I know that this question has already been asked before but none of these solutions does work for me.

So i have page like this

<apex:page standardStylesheets="false" showHeader="true" sidebar="false".../>

Note: i set showHeader="true" intentionally because i need it.

where i apply following styles

<apex:stylesheet value="{!URLFOR($Resource.resources, 'bootstrap/css/bootstrap.min.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.resources, 'fontawesome/css/font-awesome.min.css')}"/>

The problem is that salesforce stylesheets override bootstrap stylesheets. And for example my button always looks ugly(IMHO). I have already tried scoped styles(<style scoped> ...</style>) and manually adding link tag to DOM with javascript but it had no effect.

I can't stand it anymore. Anybody please help me. Thanks in advance

Best Answer

Switch off the showHeader. This will switch off the Salesforce stylesheets by default.

Switching off standardstylesheet without switching off showHeader will still apply the style sheets.

Hope it helps.

Related Topic