Create a VF page using the BootStrap CSS library and everything works just fine if the showHeader is equals FALSE. But If I try to include bootstrap in a vf page with showHeader="True" salesforce styles will get messed up. I am not using apex tags , I am using only html Tags.

Any ideas? I will appreciate any help.


You can try one thing. Add Namespace in your bootstrap.css file and then use it. It will solve your file.

Use this link to add namespace and then in your vf page code make one outer element

<div class="yourclass" >
 //all code inside.

Note There is one drawback of this method is sometime model does not work correctly. but if you don't need them then its good choice for you.

| improve this answer | |
  • I added the prefix but now whole bootstrap is not working any changes on page are required ? – Sweta Sharma Jan 29 '16 at 7:56
  • check your bootstrap remove namespace from start element . also check if you put div correctly. – Tushar Sharma Jan 29 '16 at 8:50
  • can You please tell me what should be add in .yourclass ? – Sweta Sharma Jan 29 '16 at 10:47

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.