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 5 of 5
  1. #1
    New Coder
    Join Date
    Sep 2002
    Location
    San Antonio, TX
    Posts
    57
    Thanks
    3
    Thanked 0 Times in 0 Posts

    CSS, Form Fields and You....

    Hi there! I am currently attempting to build a list of styles for a default set of HTML pages....what I mean is that the pages are going to have the styles in the HEAD of the html page, but the content in the BODY is going to be dynamically generated....

    My question is if it is possible to have seperate styles for for fields, specifically TEXT BOXES and PUSH BUTTONS, without using CLASSES. Because these pages are built dynamically, it's not possible to use classes in the field.

    Code:
    <STYLE TYPE="text/css">
    <!--
    INPUT {
    background: #99CCFF;
    color: #17268C;
    font-size: 12px;
    font-family: Arial;
    border: 1px solid #17268C
    }
    -->
    </STYLE>
    The above is what I have so far, but the style above is applying the same color and borders to my buttons and my input boxes. I would really like to make them seperate.

    Any help would be appreciated!
    ----------------------------------------
    *Let's All Do Kamikaze Shots!*
    http://www.kamikazeshots.com

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    well how are they dynamically created, couldn't you make it to where the content created also creates a class in the input field?

  • #3
    Regular Coder
    Join Date
    Jul 2004
    Location
    mile high city
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Attribute selectors are nice. Too bad about IE, though you could probably accomplish the same thing with some javascript, by finding inputs of the right type.

    Attribute selectors:
    http://css.maxdesign.com.au/selectut..._attribute.htm
    Computer, kill Flanders... Did I hear my name? My ears are burning...
    Good start. Now finish the job.

  • #4
    New Coder
    Join Date
    Sep 2002
    Location
    San Antonio, TX
    Posts
    57
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Aero, the HTML is dynamically created by a software product that I am working on....

    It looks like the attribute selectors would be the perfect solution....what are they supported by? Why not IE?! lol....

    I think I have solved the problem though, using div tags and styles for indivudal divs....looks like I can do what I need to do in this case! Thanks for the help!
    ----------------------------------------
    *Let's All Do Kamikaze Shots!*
    http://www.kamikazeshots.com

  • #5
    Regular Coder
    Join Date
    May 2004
    Location
    Berkeley, California Age: 15
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dean Edward's IE7 javascript stuff gives IE attribute selector capabilities, does it not?

    here's his example:

    http://dean.edwards.name/IE7/compati...ttr-value.html

    It may be confusing at first, but IE7 is basically a javascript that turns on many feature enhancements in Explorer 5 and 6. I believe this is the correct module:

    http://dean.edwards.name/IE7/src/?ie7-css3.js

    Good luck!

    Edit: Maybe its this one: http://dean.edwards.name/IE7/src/?ie7-css2.js You could just install the whole package...
    Last edited by Jalenack; 03-09-2005 at 09:37 PM.
    Jalenack.com .:. YWDA Founder .:. Rounded Corners Maker 1.1! .:. My Blog
    The hardest thing about teaching is not knowing the right answers, but knowing the right questions - Elisabeth Klein
    Pretty buttons does not a great website make.


  •  

    Posting Permissions

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