Solved

Salesforce Apex not same result as my HTML page. Salesforce breaks it.

Posted on 2016-11-10
3
67 Views
Last Modified: 2016-11-27
I have created a page using HTML, jscript, css style sheets, etc. I have downloaded the stub.js and VFMetadataSender.js files that Salesforce adds to the header.

When I run my page as pure html with js and css source files, it looks beautiful.

However, when I put my css and js as static resources in Salesforce and run the page as an Apex page, my checkboxes are munged and it looks bad. I am using the exact same resources and code, other than when I create it at salesforce, I am using an apex page and the static resources pointing to the same code I use with the html.

I can't figure out what Apex/Salesforce is doing to my code to mess it up when it's so beautiful otherwise.

Any ideas what I can look at? Maybe someone else has had this problem with Salesforce breaking things.
thanks!
0
Comment
Question by:Starr Duskk
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
Rahul_Gade earned 500 total points
ID: 41891350
Salesforce VF page by default include some css, and there are high chances that there is conflict between the css that you have defined and what SF has defined. Using browser's developers tool you can check with the conflict and update your css class name accordingly.
or try "showHeader=false" to reduce the default stylesheet inclusion.
0
 
LVL 2

Author Comment

by:Starr Duskk
ID: 41892197
we already downloaded their included files by viewing the source code, and don't find at conflicts.
and we already have showheader = false.
0
 
LVL 2

Author Comment

by:Starr Duskk
ID: 41903367
we just quit using salesforce static resources and use the script to a regular web path instead and it now works.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CSS issue in Nested Master Pages 9 26
Select case on click 3 20
Html value of radio 14 28
Why "Mobile First"? 5 18
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question