hi folks,
i have a question, a client of me wants colored background for fields input types etc for those which are mandatory etc etc. here is my issue, some fields are coming dynamically from database and other are just static textfield which can be entered by user. but i see difference between the one which has been drived from database and other which need to be data filled in it. is it really a issue? or is it just me
youâve lost me
css applies w/o discrimination. now, i donât know what you mean by âdynamically createdâ, but input controls, text or otherwise obey this rule, these elements end up being html static markup. what do you mean by âhave any effect on before or afterâ itâs another thing that eludes me.
if you are referring to AJAX or input controls created with javascript manipulation of the DOM, then yes, css applies to them no matter what, the same like for the âstaticâ input controls.
about the âfunny outputâ an example would do wonders for my understanding of your problem
Iâm not sure what the problem is either. Is it always the same fields that are mandatory (assuming they are included)? If yes, it should be very easy to apply a class to them and then set the styling that way.
If different fields are going to be mandatory in different circumstances, you will probably need to find a way to add a class dynamically.
so ur saying that the when u apply a css to a field dynamically created or those which are text field of a form doesnât have any effect on before or after? i find it hard to believe coz when i apply css on inputs, text fields, or dynamically created makes some funny output
input controls: controls to take user input.
values in input controls: default values or user input values.
itâs not clear whether you are referring to controls created dynamically, or values for those inputs, some default values dynamically filled by a database call, values that can and will be changed by the user.
either way, the way an input control is created makes no difference. if those fields are required, there are many ways to point that out, but coloured background may not be the best option. usually, its label indicates the requirement needed. itâs hard to find a coloured background that doesnât impede on the visibility of the caret or pointer position and makes for a good text contrast visibility.