Log in

View Full Version : How do you set the background color for an input box in focus? [Search]


AshenTemper
06-14-2012, 01:56 PM
Here is the image showing the issue:

https://vborg.vbsupport.ru/attachment.php?attachmentid=139124&stc=1&d=1339689387

You can see which box is in focus (it is the one in white). I adjusted the color of these using the following in additional.css:

.textbox, textarea, select {
background-color: #1A1A1A;
border: 1px solid #5B5B5B;
color: #CCCCCC;
}
Which works great except for when the box is in focus (ie, active and the mouse is in it ready for input data). I've tried a variety of things such as:

input:focus { background: pink; }
.textbox:focus { background: pink; }
.textarea:focus { background: pink; }
.select:focus { background: pink; }
But none of them have worked. Any idea on how I can change this to be a different color when in focus?

cellarius
06-16-2012, 07:54 AM
.formcontrols .blockrow input.textbox:focus {
background: red;
}

Use firebug to find out what css definition is needed.

AshenTemper
06-16-2012, 01:14 PM
.formcontrols .blockrow input.textbox:focus {
background: red;
}

Use firebug to find out what css definition is needed.

Ahh, I am using Chrome's Web Tools which is pretty close to the same but, for the life of me, I just couldn't figure that out. Thanks, I owe you one (it works perfectly).

cellarius
06-16-2012, 03:37 PM
Ahh, I am using Chrome's Web Tools which is pretty close to the same
I'm using Chrome for browsing, but for stuff like that I never miss to fire up my firefox just for the full version of firebug. It may be that I'm better used to it, but I never found Chrome's Web Tools came close enough.

Thanks, I owe you one (it works perfectly).
Nah, not for that. But if you insist and I ever get around to Texas... :D