• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Forms in CSS

Tabula Rasa

Stranger Than Kindness
Political User
#1
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
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
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.
 

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,014
Latest member
sanoravies