SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    manging input fields after applying css

    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
    All those who wander aren't lost.

  2. #2
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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
    All those who wander aren't lost.

  4. #4
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  5. #5
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by emaarkhan View Post
    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
    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.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •