Forms in CSS

Discussion in 'Web Design & Coding' started by Tabula Rasa, Dec 30, 2002.

  1. Tabula Rasa

    Tabula Rasa Stranger Than Kindness Political User

    Messages:
    3,233
    Location:
    Israel
    I'm having some trouble with CSS regarding form borders,

    I have this code in the beginning of the CSS:

    INPUT {
    background-color: #FFFFFF;
    border : 1px solid #476297;
    font-family : Verdana;
    font-size : 8pt;
    letter-spacing : 1px;
    color : #476297;
    }

    When i create an textbox or a text era i have a blue border round it (instead of the usual grey one) , the problem is that the blue border appears around Radio Buttons as well and i don't like it... if i change the border color to FFFFFF the border around the Radio Button disappears but so does the border around the text boxes (and you cant see them).

    anyone knows of a way to fix this?

    Much appreciated :)
     
  2. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    I am not sure how you do this text fashion, I never really looked, but you could redefine the HTML textbox tag to use the coloured border.

    I know how to do this in dreamweaver, I will see about how its done by using text editor
     
  3. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Since radio buttons also use the <INPUT>-tag it will get the same modifications as the textbox. What you do is you change the CSS code to:

    INPUT.textbox {
    background-color: #FFFFFF;
    border : 1px solid #476297;
    font-family : Verdana;
    font-size : 8pt;
    letter-spacing : 1px;
    color : #476297;
    }

    and change the textbox code to:

    <INPUT TYPE="text" CLASS="textbox" VALUE="blabla">

    This way you can have more classes of text boxes (like INPUT.redtextbox) and separate classes for radio buttons and normal buttons.
     
  4. Tabula Rasa

    Tabula Rasa Stranger Than Kindness Political User

    Messages:
    3,233
    Location:
    Israel
    THANKS! , you really saved my life on this one!
     
  5. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    Congratulations, you now get a Benny as part of a life debt
     
  6. Tabula Rasa

    Tabula Rasa Stranger Than Kindness Political User

    Messages:
    3,233
    Location:
    Israel
    :p

    Geffy, bite me.
     
  7. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    hahahahahahahahahahahahahahaha