There were a few problems with your styles. Firstly, your field selector is not quite right.
.Hdr_nav_search_input:focus .Hdr_nav_search_box
This applies when selecting all .Hdr_nav_search_box where they are descendants of .Hdr_nav_search_input . This is actually a brother, so you want to use the following sibling + selector:
.Hdr_nav_search_input:focus + .Hdr_nav_search_box
Secondly, this selector will override the color change if it works.
.Hdr_nav_search_box span,.Hdr_nav_search_box i{ ... }
You can just use
.Hdr_nav_search_box { ... }
Here is a demonstration and style changes that I made to make it work.
jsFiddle
.Hdr_nav_search_input:focus + .Hdr_nav_search_box { color: #F00; } .Hdr_nav_search_box { line-height: 25px; color: gray; }
Daniel Imms
source share