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. |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
04-07-2009, 07:15 AM | #1 |
♥ ♦ ♣ ♠
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." |
04-07-2009, 07:17 AM | #2 |
♥ ♦ ♣ ♠
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." |
04-07-2009, 07:17 AM | #3 |
Sofa King Band
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
|
:focus
Just like javascript. |
04-07-2009, 07:18 AM | #4 |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
|
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." |
04-07-2009, 07:24 AM | #5 |
Confirmed User
Join Date: Feb 2007
Location: 418194907
Posts: 3,134
|
Browser incompatibility? Specificity? Show us your code.
|
04-07-2009, 07:26 AM | #6 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 54,946
|
Quote:
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 |
|
04-07-2009, 07:36 AM | #7 | |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
|
Quote:
__________________
"I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
|
04-07-2009, 07:37 AM | #8 |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
|
#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." |
04-07-2009, 07:49 AM | #9 | |
Confirmed User
Join Date: Feb 2007
Location: 418194907
Posts: 3,134
|
Quote:
Code:
<input type="text" class="text" /> |
|
04-07-2009, 07:50 AM | #10 |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
|
Correct, the class is "text".
__________________
"I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
04-07-2009, 07:52 AM | #11 |
Too lazy to set a custom title
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 |
04-07-2009, 07:53 AM | #12 |
Confirmed User
Join Date: Feb 2007
Location: 418194907
Posts: 3,134
|
|
04-07-2009, 07:55 AM | #13 | |
Sofa King Band
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
|
Quote:
You can change the border, colours, fonts and all that fun stuff, but the actual value would need to be set using javascript. |
|
04-07-2009, 07:57 AM | #14 |
♥ ♦ ♣ ♠
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." |
04-07-2009, 07:58 AM | #15 |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
|
What version of IE are you on?
__________________
"I'm selflessly supporting the common good, but only coincidentally looking out for No.1." |
04-07-2009, 07:59 AM | #16 |
♥ ♦ ♣ ♠
Industry Role:
Join Date: Sep 2002
Location: Porn Valley, CA
Posts: 10,590
|
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." |
04-07-2009, 08:11 AM | #17 |
Confirmed User
Join Date: Feb 2007
Location: 418194907
Posts: 3,134
|
|
04-07-2009, 08:30 AM | #18 |
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.
|
04-07-2009, 12:44 PM | #19 |
I make pixels work
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
|
this thread makes baby jesus weep in sorrow...
__________________
|