Jump to content


Button and Text-Box Color


2 replies to this topic

#1 FaNN

    Young Padawan

  • Members
  • Pip
  • 3 posts

Posted 23 August 2008 - 12:19 AM

I was wondering how can i change the 3dlight, face, shadow etc. of a button and a text-box. What do i have to insert into style.css ?

I want it to look like this:
Posted Image
But i want the border to become blue on mouse-over and red on click, same for the button.

The problem was solved with the background and border:
Text-box:
<input type="text" name="nick" size="20" style="color: #000000; font-family: Tahoma; font-size: 11; border: 1px solid #00FF00; background-color: #FFFFFF" value="Nickname">
Button:
<input type="button" value="LogIn" name="B1" style="color: #000000; font-family: Tahoma; font-size: 11; border: 1px solid #00FF00; background-color: #FFFFFF">

But i still don't know how to do the mouse-over and click.

Edited by FaNN, 23 August 2008 - 02:05 AM.


#2 xwazawx

    Young Padawan

  • Members
  • Pip
  • 45 posts

Posted 26 August 2008 - 12:54 AM

Hey,
This would work (I do believe).

<STYLE>
.text
{
color: #000000; font-family: Tahoma; font-size: 11; border: 1px solid #00FF00; background-color: #FFFFFF;
}
.text:hover
{
color: #000000; font-family: Tahoma; font-size: 11; border: 1px solid #FF0000; background-color: #FFFFFF;
}
.text:focus
{
color: #000000; font-family: Tahoma; font-size: 11; border: 1px solid #0000FF; background-color: #FFFFFF;
}
</STYLE>

<INPUT TYPE="text" CLASS="text">

..

Something similar can be done with the buttons using the pseudo classes hover and focus - :)

#3 FaNN

    Young Padawan

  • Members
  • Pip
  • 3 posts

Posted 26 August 2008 - 08:16 AM

Thanks. I owe you one :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users