Guestbook 1.3.0 - styling textarea

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
Marijus

Guestbook 1.3.0 - styling textarea

Post 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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Guestbook 1.3.0 - styling textarea

Post by Dr.CSS »

Most likely can be done in CSS...
uniqu3

Re: Guestbook 1.3.0 - styling textarea

Post 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  ;)
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Guestbook 1.3.0 - styling textarea

Post 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
}
uniqu3

Re: Guestbook 1.3.0 - styling textarea

Post by uniqu3 »

Inded Dr.CSS, i had a brain error  :D maybe just shouldn't do any posts at 1AM and after a long day  ;)
Marijus

Re: Guestbook 1.3.0 - styling textarea

Post 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>
Locked

Return to “Layout and Design (CSS & HTML)”