View Full Version : Form Feilds
Danny
February 27th, 2005, 17:36
Hey,
Seem to be posting way to may problems at the moment :(
Basically what i need is to know how to make the form feilds on a site change when the user selects them, as you can see on the link below:-
http://www.htmldog.com/contact/
Just click in one of the text feilds to see what i mean.
Cheers,
Danny
Martin
February 27th, 2005, 17:42
textarea:focus, input:focus {
background-color: #ffc;
}
Edit: Bah, hang on. That's for everything but IE. I'll see what it needs to work in IE.
Danny
February 27th, 2005, 17:45
Cheers, do i need to add anything to the actual form?
Danny
February 27th, 2005, 17:47
Ignore the last post, works thanks
Jamie
February 27th, 2005, 17:48
See Zopesters edit though Danny...
Edit: Bah, hang on. That's for everything but IE. I'll see what it needs to work in IE.
Danny
February 27th, 2005, 17:50
Yeah iv just noticed, i presume it just doesnt do the rollover effect in IE?
Martin
February 27th, 2005, 17:53
http://www.relativelyabsolute.com/articles/focus/ - adding a .htc file to achieve the :focus effect for IE/Win.
Jamie
February 27th, 2005, 17:53
Correct. Maybe http://www.relativelyabsolute.com/articles/focus/ will help. I haven't looked at it in detail but seems to do a nice job.
EDIT - Seems Zop did a Google like me. :lol:
Danny
February 27th, 2005, 17:59
hehe cheers guys
Martin
February 27th, 2005, 18:14
Pretty major caveat needed here: one of the security improvements Micrsoft made with XPSP2 was that all web page components have to be sent with the correct MIME type. For .htc files, that means a MIME type of text/x-component.
To change this setting you'll need to either add the following line to your httpd.conf file if you're running Apache, or add this to your .htaccess file:
AddType text/x-component .htc
Oh, and one bug with the way certain versions of IE load .htc files - don't use relative paths (../styles/hover.htc) because sometimes the file won't load. Use either simple (hover.htc) or absolute (/styles/hover.htc) paths only.
Danny
February 27th, 2005, 18:51
Ok thanks again
Danny
March 7th, 2005, 17:28
http://www.dev-news.com/index.php?p=28#more-28
Thought this would be useful as a resource for anyone who needs to refer to basic questions.
vBulletin® v3.6.8, Copyright ©2000-2010, Jelsoft Enterprises Ltd.