Class name not showing in source when assigned
James Dawson created the topic: Class name not showing in source when assigned
Hello,
I'm having a hard time assigning a css class to a form field so that I can style it. When I input a class all it's assigned to is the label and meanwhile the rest of the inputs seem to have style information hard-coded into them. Is there any documentation or an easy way to style the forms? I see the edit css option but it's not allowing me to change certain things.
Please Log in or Create an account to join the conversation.
- Topic Author
- James Dawson
- Offline
- Fresh Boarder
- Posts: 3
- Thank you received: 0
11 years 9 months ago
Administrator replied the topic: Re: Class name not showing in source when assigned
Dear James,
The class is given to the parent HTML tag of the field and the field label. So if you want to style the input tag, you should write something like this into the CSS:
.[YOUR CLASS] input
{
//CSS rules
}
Best regards
Web-Dorado team
Please Log in or Create an account to join the conversation.
- Administrator
- Offline
- Administrator
- Posts: 800
- Thank you received: 62
11 years 9 months ago
James Dawson replied the topic: Re: Class name not showing in source when assigned
Thank you for your reply. Unfortunately that doesn't seem to fix my issue (although interestingly I can see my style rules when I go to edit the form). For example, in my form I've created a text input of type address. I've assigned it the class "addy" and when I try to style that class all that changes is the label. Here's the source code:
<td class="addy" id="4_label_section10" align="left" valign="top"><span class="label" id="4_element_label10">Address:</span>
None of the other table data's have that class. Here's the source for the field I want to style:
<input onchange="change_value('4_street110')" name="4_street110" id="4_street110" style="border-width: 1px; padding: 0px; width: 100%;" type="text">
If I edit the css to something like .addy input { border: 2px solid #FF0000;} I can see the red border when I edit the form but it doesn't display that way on the front end. Do you have any ideas? Thanks for your help.
Please Log in or Create an account to join the conversation.
- Topic Author
- James Dawson
- Offline
- Fresh Boarder
- Posts: 3
- Thank you received: 0
11 years 8 months ago
Administrator replied the topic: Re: Class name not showing in source when assigned
Dear James,
Please try using
border: 2px solid #FF0000 !important;
(add !important).
If this does not solve the problem, please give us a temporary admin user account to your site and describe what style do you want to change. We will try to modify the CSS for you.
Best regards
Web-Dorado team
Please Log in or Create an account to join the conversation.
- Administrator
- Offline
- Administrator
- Posts: 800
- Thank you received: 62
11 years 8 months ago