I have a question that will probably seem really simple but I don't really no how to use JavaScript so have no idea...
What i would like to do would be that when people click inside an input box to start typing, the hole div holding that box changes colour to something set buy me, this is the layout so far... ___________styling__________
_____HTML____________ <div id="contactbox1" class="normal"> <input type="text" size="40" class="normal" onfocus="this.className='focus'" onblur="this.className='normal'" /> </div> _____HTML___________ That will change the colour of the input box... but I want to change background colour of the div="contactbox1" Any ideas? (Does anybody no a good place to learn lots of JavaScript from scratch... Videos would be good as I'm deferentially a visual learner, that's why I love the CSS-Tricks videos on itunes!) Regards
I have a question that will probably seem really simple but I don't really no how to use JavaScript so have no idea...
What i would like to do would be that when people click inside an input box to start typing, the hole div holding that box changes colour to something set buy me, this is the layout so far...
___________styling__________
.normal
{
background-color:gray;
}.focus
{
background-color:white;
}
#contactbox1{
height: 100px;
}
______styling_____________
_____HTML____________
<div id="contactbox1" class="normal">
<input type="text" size="40" class="normal" onfocus="this.className='focus'" onblur="this.className='normal'" />
</div>
_____HTML___________
That will change the colour of the input box... but I want to change background colour of the div="contactbox1" Any ideas?
(Does anybody no a good place to learn lots of JavaScript from scratch... Videos would be good as I'm deferentially a visual learner, that's why I love the CSS-Tricks videos on itunes!)
Regards