HTML & CSS
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 :lol:
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.
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.