![]() |
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? |
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.
|
:focus
Just like javascript. |
Quote:
|
Browser incompatibility? Specificity? Show us your code.
|
Quote:
Code:
<form method="get" id="searchform" action="http://www.domain.com/"> |
Quote:
|
Quote:
#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) |
Quote:
Code:
<input type="text" class="text" /> |
Quote:
|
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. |
Quote:
|
Quote:
You can change the border, colours, fonts and all that fun stuff, but the actual value would need to be set using javascript. |
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.
|
Quote:
|
Quote:
|
Quote:
|
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.
|
this thread makes baby jesus weep in sorrow...
|
All times are GMT -7. The time now is 12:04 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc