Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jun 2005
    Posts
    6
    Member #
    10157
    hi friends.
    it is possible to define different css for different input types.
    i want to do this.
    i have a html page.
    this page contains different form elements and many of them are <input ...>.
    as you know;
    for text boxes <input type="text">
    for check boxes <input type="checkbox">
    for radio <input type="radio">
    for password boxes <input type="password">
    for submit buttons <input type="submit"> etc.
    i want to define a css top of the document and this css only effect type="text", and i define another css it only effect type="submit".
    i wish i could express my problem.
    thanks for your interests.

  2.  

  3. #2
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    I am not aware you can do this.

    You can, however, create different styles for each...

    Code:
    .text_box {
         background-color: cyan;
    }
    .check_box {
         background-color: green;
    }
    ...then use the class attribute to assign them...

    Code:
       <input type="text" class="text_box">
       <input type="checkbox" class="check_box">
    etc.

    There may be another way but I don't know it.

    Sean


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:42 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com