+ Start a Discussion
Molson94Molson94 

Visualforce Component / CSS Styles not working...

Hey Everyone,

Having some issues with the use of a Visualforce Component, and how inputField reacts to styling.
On the current project, I have a parent Visualforce page, which contains a series of components.
The component contains form elements, that have the correct styleClass associated (even tried html-class, and wrapping the elements in span) but are not respecting the style sheet definitions.

I have a previous project that has inputFields that DID reflect the proper styles in the CSS sheet, so this feels inconsistent, and i may be doing something incorrect, or missing some sort of exception.

Questions for anyone who has encountered this before, or is well versed in :
1. Do styles need to be referenced inline, or local to the component, not the parent?
2. The form elements are apart of a dependant picklist, does this have an impact? There was some old documentation about this being a bug, but when I look at the source of the page the class is being passed through correctly, and it appears to not be the issue.
3. This is only appearing to affect how inputField for picklists is rendering, inputTextArea and inputText render fine.
4. One time I was able to refresh the page and the styles appeared correct for a fraction of a second, before "switching" back to the incorrect way. Whats this about? Using Firefox to view the page.

Thanks in advance for taking a look!