I am using the django-two-factor-auth package, and the problem is I have not been able to identify either the ids or class of the fields in the included wizard forms. I have tried #id_username and #id_password, but my styling does not apply. I thought these would be the ids because I believe the form inherits from AuthenticationForm. I have also tried a variety of others including #username, #password; #id_username_field, #id_password_field, and #username_field, #password_field. Maybe it's something else I am overlooking. Does anyone know how to call on these fields for styling with css?
Have you tried using the "Inspector Tool" in your browser? By doing so, you can then see what the actual id and/or class is applied to the certain form element in the DOM.
Chrome: https://developers.google.com/web/tools/chrome-devtools/inspect-styles/
Firefox: https://developer.mozilla.org/en-US/docs/Tools/Page_Inspector/How_to/Examine_and_edit_HTML
Safari: https://developer.apple.com/safari/tools/
Edge: https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide/elements
If, for whatever reason, you are already in fact referencing the correct class/id, then perhaps your styles are not taking precedence. At that point, seeing some code would help to pin-point the issue.
-
Awesome, @EdwardM. Inspect element is what did it. For anyone interested the ids were #id_auth-username, #id_auth-password. Such a simple solution, but I forgot to use inspect element and wasted time sifting through .py files for the correct ids. Thank you, I appreciate your help. – Whodini Sep 24 '18 at 23:54