Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts

    multiple form styles

    hi all,

    hopefully a quick one... I'm using in my css...

    input{style stuff here...}

    and that makes all of my form inputs that dont have a specified style.... the style where it says 'style suff here'.. thats all good..but i want two styles of form.. i want that one above.but also how do i do it so I can specify the class on the inputs... if i specifed class=input_b would the css be ...

    input{style stuff here...}
    input.input_b{other style stuff here...}

    ?

    any info be great many thanks

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,866
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Yes,
    Code:
    input.input_b{
    /*put some style for class input_b */
    }
    Code:
    <input type="text" class="input_b" >
    If we apply style directly on input selector, it'll become hard to control the styles of various types of inputs like text, button etc (since IE doesn't recognize selectors based on attributes )
    Last edited by abduraooft; 07-15-2008 at 10:02 AM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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