0

How to change the textbox's background when it is focused

asked 2009-11-16 12:54:25 +0800

gyowanny gravatar image gyowanny
283 1 2 6

updated 2009-11-16 13:05:02 +0800

Hi

I want my textboxes to have their background color set to yellow when they are focused.
I've tried the following CSS code but it does not works completely. Just the field's border is being changed to the specified color:

.z-textbox:focus{
    background-image: none;
    background-color: #ffffaa;
    border: solid 1px #33677F;
}

Thanks

Gyo

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-11-16 13:13:04 +0800

gyowanny gravatar image gyowanny
283 1 2 6

Hi

Got it! The following code works fine!

.z-textbox-focus{
    background: #ffffaa none;
    border: solid 1px #ffffaa;
}

Thanks

Gyo

link publish delete flag offensive edit

answered 2009-11-16 13:26:05 +0800

gyowanny gravatar image gyowanny
283 1 2 6

Hi again

I wanted to apply the same style for the combobox component so the property to change is .z-combobox-inp:focus

.z-textbox-focus, .z-combobox-inp:focus{
	background: #ffffaa none;
    border: solid 1px #33677F;
}

thanks

Gyo

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-11-16 12:54:25 +0800

Seen: 572 times

Last updated: Nov 16 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More