Page 1 of 1
Guestbook 1.3.0 - styling textarea
Posted: Tue Nov 02, 2010 8:07 pm
by Marijus
How insert on focus parameter for Textarea (id="guestbook_message_input")
I want to set background image for this textarea and remove background on focus.
Re: Guestbook 1.3.0 - styling textarea
Posted: Tue Nov 02, 2010 11:32 pm
by Dr.CSS
Most likely can be done in CSS...
Re: Guestbook 1.3.0 - styling textarea
Posted: Tue Nov 02, 2010 11:40 pm
by uniqu3
It could be like this if your textarea is
Code: Select all
textarea:focus#guestbook_message_input {
your css
}
You will also either need some javascript to get pseudo-class working in IE6/7 or ignore these browser

Re: Guestbook 1.3.0 - styling textarea
Posted: Wed Nov 03, 2010 1:44 am
by Dr.CSS
Hmm I thought it would be more like...
textarea#guestbook_message_imput {
background-image: url(uploads/path/toimage/image.jpg)
}
textarea#guestbook_message_imput:focus {
background-image: none
}
Re: Guestbook 1.3.0 - styling textarea
Posted: Wed Nov 03, 2010 6:41 am
by uniqu3
Inded Dr.CSS, i had a brain error

maybe just shouldn't do any posts at 1AM and after a long day

Re: Guestbook 1.3.0 - styling textarea
Posted: Wed Nov 03, 2010 7:54 am
by Marijus
Thanks for the help, it is almost the same what I want, but how to leave textarea without background after focus? (on ie7 or older it not working)
In older guestbook version I was integreated
onfocus="this.style.backgroundImage='none';" into form template.
It it’s possible to make the same in Guestbook 1.3.0 version?
In this new version I can’t find where is created and I want to change it to something like this:
Code: Select all
<textarea name="message" cols="50" rows="7" id="guestbook_message_input" onfocus="this.style.backgroundImage='none';"> </textarea>