Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-07-2009, 07:15 AM   #1
Voodoo
♥ ♦ ♣ ♠
 
Voodoo's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
CSS Question: Form Element "States"

Hey,

Can't seem to find the right state-term for when the cursor is actually IN a form input text field blinking and ready to type. I'm trying to style this w/ CSS and :active :hover :selected don't seem to work.

Any idears?
__________________

"I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
Voodoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:17 AM   #2
Voodoo
♥ ♦ ♣ ♠
 
Voodoo's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
NOTE: Hover works... but only when you hover. LOL (Obviously, just didn't want you to think it isn't functioning.) It just doesn't work for what I'm trying to do.
__________________

"I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
Voodoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:17 AM   #3
StuartD
Sofa King Band
 
StuartD's Avatar
 
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
:focus

Just like javascript.
StuartD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:18 AM   #4
Voodoo
♥ ♦ ♣ ♠
 
Voodoo's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
Quote:
Originally Posted by StuartD View Post
:focus

Just like javascript.
Should have noted that also. I tried :focus, but it doesn't seem to work either. Kinda weird.
__________________

"I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
Voodoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:24 AM   #5
Sands
Confirmed User
 
Sands's Avatar
 
Join Date: Feb 2007
Location: 418194907
Posts: 3,134
Browser incompatibility? Specificity? Show us your code.
Sands is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:26 AM   #6
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,946
Quote:
Originally Posted by Voodoo View Post
Hey,

Can't seem to find the right state-term for when the cursor is actually IN a form input text field blinking and ready to type. I'm trying to style this w/ CSS and :active :hover :selected don't seem to work.

Any idears?
Code:
<form method="get" id="searchform" action="http://www.domain.com/">
<input type="text" value="search for something" name="s" id="searchinput" onfocus="if (this.value == 'search for a something') {this.value = '';}" onblur="if (this.value == '') {this.value = 'search for a something';}" />
<input type="submit" id="searchsubmit" value="" />
</form>
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:36 AM   #7
Voodoo
♥ ♦ ♣ ♠
 
Voodoo's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
Quote:
Originally Posted by fris View Post
Code:
<form method="get" id="searchform" action="http://www.domain.com/">
<input type="text" value="search for something" name="s" id="searchinput" onfocus="if (this.value == 'search for a something') {this.value = '';}" onblur="if (this.value == '') {this.value = 'search for a something';}" />
<input type="submit" id="searchsubmit" value="" />
</form>
Yeah, this would work, I'm trying to do it in CSS though. Thought there might be a way.
__________________

"I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
Voodoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:37 AM   #8
Voodoo
♥ ♦ ♣ ♠
 
Voodoo's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
Quote:
Originally Posted by Sands View Post
Browser incompatibility? Specificity? Show us your code.
#main_body input.text {}
#main_body input.text:focus {}

also tried:
#main_body input.text:focus:selected
#main_body input.text:selected
#main_body input.text:hover (THIS WORKS)
__________________

"I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
Voodoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:49 AM   #9
Sands
Confirmed User
 
Sands's Avatar
 
Join Date: Feb 2007
Location: 418194907
Posts: 3,134
Quote:
Originally Posted by Voodoo View Post
#main_body input.text {}
#main_body input.text:focus {}

also tried:
#main_body input.text:focus:selected
#main_body input.text:selected
#main_body input.text:hover (THIS WORKS)
This might be a dumb question, but when you write input.text, you're assigning a class named "text" to the input, right? You're not adding that notation because the input type is text?

Code:
<input type="text" class="text" />

Last edited by Sands; 04-07-2009 at 07:50 AM..
Sands is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:50 AM   #10
Voodoo
♥ ♦ ♣ ♠
 
Voodoo's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
Quote:
Originally Posted by Sands View Post
This might be a dumb question, but when you write input.text, you're assigning a class named "text" to the input, right? You're not adding that notation because the input type is text?

Code:
<input type="text" class="text" />
Correct, the class is "text".
__________________

"I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
Voodoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:52 AM   #11
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,946
out of all the search forms that do this, ive never seen a pure css way, everyone does it via the form.

Would be interesting if it could be done.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:53 AM   #12
Sands
Confirmed User
 
Sands's Avatar
 
Join Date: Feb 2007
Location: 418194907
Posts: 3,134
Quote:
Originally Posted by Voodoo View Post
Correct, the class is "text".
Changing the background color on focus with CSS works here in FF and IE. Maybe what you're trying to change during the focus state is the problem? Post your full CSS.
Sands is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:55 AM   #13
StuartD
Sofa King Band
 
StuartD's Avatar
 
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
Quote:
Originally Posted by Voodoo View Post
Yeah, this would work, I'm trying to do it in CSS though. Thought there might be a way.
Are you actually trying to change the text in the form using css??? Because you can't.
You can change the border, colours, fonts and all that fun stuff, but the actual value would need to be set using javascript.
StuartD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:57 AM   #14
Voodoo
♥ ♦ ♣ ♠
 
Voodoo's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
Yeah, looks like it's an IE issue. :focus works in FF. I found some javascript pseudo-classes that force it to work in IE though.
__________________

"I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
Voodoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:58 AM   #15
Voodoo
♥ ♦ ♣ ♠
 
Voodoo's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
Quote:
Originally Posted by Sands View Post
Changing the background color on focus with CSS works here in FF and IE. Maybe what you're trying to change during the focus state is the problem? Post your full CSS.
What version of IE are you on?
__________________

"I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
Voodoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 07:59 AM   #16
Voodoo
♥ ♦ ♣ ♠
 
Voodoo's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
Quote:
Originally Posted by StuartD View Post
Are you actually trying to change the text in the form using css??? Because you can't.
You can change the border, colours, fonts and all that fun stuff, but the actual value would need to be set using javascript.
Trying to change the background :focus of text input on a page. Works in FF, just not IE (at least not the version I'm using 7.0.6).
__________________

"I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
Voodoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 08:11 AM   #17
Sands
Confirmed User
 
Sands's Avatar
 
Join Date: Feb 2007
Location: 418194907
Posts: 3,134
Quote:
Originally Posted by Voodoo View Post
What version of IE are you on?
IE8. Yeah, it doesn't work in IE6 or IE7.
Sands is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 08:30 AM   #18
Killswitch - BANNED FOR LIFE
Guest
 
Posts: n/a
Interesting stuff, I use Javascript to do mine, but while reading this thread, you could easily do it with css and a image with the text on it. heh.
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-07-2009, 12:44 PM   #19
Deej
I make pixels work
 
Deej's Avatar
 
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
this thread makes baby jesus weep in sorrow...
__________________

Deej's Designs n' What Not
Hit me up for Design, CSS & Photo Retouching


Icq#30096880
Deej is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.