How to change the background color
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 8
- Joined: Fri Jul 24, 2009 4:02 am
How to change the background color
Please let me know how to change the background color of single text box in the form . How do i add a class to the textbox and refer in the css.My form has multiple text boxes.
0 x
-
- Ebase User
- Posts: 94
- Joined: Fri Sep 14, 2007 12:18 pm
- Location: The Netherlands
- Contact:
Re: How to change the background color
While I have not tried it, you could try to use FPL to set a highlight style for the element you wish to control. The highlight style needs to be defined in your Presentation Template. The highlight style adds a class to the selected element - open up the source of the page when viewing in the web browser and search the html to find it. Use this class to zoom in on your specific text box that you wish to style using CSS.
I am using this in our forms to style buttons, so I am pretty sure it will also work for a text box. To date, the class always remains the same for the highlight style - this means you can use the same css to change other text boxes using FPL without having to check which class will be assigned.
I am using this in our forms to style buttons, so I am pretty sure it will also work for a text box. To date, the class always remains the same for the highlight style - this means you can use the same css to change other text boxes using FPL without having to check which class will be assigned.
0 x
- Wai
- Moderator
- Posts: 165
- Joined: Wed Sep 12, 2007 9:04 am
- Location: Sandy, UK
- Contact:
-
- Ebase User
- Posts: 94
- Joined: Fri Sep 14, 2007 12:18 pm
- Location: The Netherlands
- Contact:
Re: How to change the background color
Okay, there are 2 disadvantages of this:Wai wrote:Alternatively, as this is an editable field, Ebase will have given the text field an ID.
It's possible to find the ID by looking at the HTML source of the form. You can then apply the CSS to the ID.
1. The ID is not unique through the whole system. If you use the same CSS for all forms then you may have fields changing colour in the other forms where you do not want them to.
2. The Ebase generated ID is not static, if you add fields to the page there are cases where the ID changes. You would need to sync your CSS and your Form every time you change something in the form or risk the wrong field changing colour.
0 x
Who is online
Users browsing this forum: No registered users and 124 guests