- This topic is empty.
-
AuthorPosts
-
February 25, 2010 at 8:34 am #28145
psychotronic
MemberHi all,
I have a problem and I hope I can find a solution here
What i want to do is quite simple. this screenshot maybe can explain the problem better :
[img]http://img411.imageshack.us/img411/2100/changeo.jpg[/img]I want to change the background color for text selection of the input text.
Is it possible to be done?I have tried the css code
Code:::selection {
background: #ffb7b7; /* Safari */
}
::-moz-selection {
background: #ffb7b7; /* Firefox */
}but no luck :(
thanks !!
February 25, 2010 at 12:43 pm #71577psychotronic
Member"virtual" wrote:heheh , i think you ‘ve misunderstood me :p .
Please re-read my question. I’m not looking for something fancy attribute for my form, styling, jquery-ing or something like that.
I just want to find how, to change background color of any text selection, where the text is placed inside a input text or text area.Of course I have googled it before, but maybe I missed it :p . So I will really appreciate if you can show me the exact solution, url, manual etc, not just letting lmgtfy.com do that for me ;)
February 25, 2010 at 8:09 pm #71628Nipperkin
MemberThe property "background" is correct, at least that’s how I’ve done what you’re trying to do (see http://inanindeterminateplace.com/contact/ for an example).
That said, what is the :: doing there? Could that be the problem?
February 26, 2010 at 12:55 am #71634psychotronic
Member"Nipperkin" wrote:The property "background" is correct, at least that’s how I’ve done what you’re trying to do (see http://inanindeterminateplace.com/contact/ for an example).That said, what is the :: doing there? Could that be the problem?
thank you for your reply;)
please see the screenshot of your contact form :
[img]http://img23.imageshack.us/img23/9000/bluebg.png[/img]I want to change the bacground color of selexted text "Lorem ipsum bla bla"
Hope you can see what I mean :)February 26, 2010 at 3:07 am #71638Nipperkin
MemberSorry, I didn’t read you closely enough (:oops: ) and don’t have a solution. I sniffed around a bit and found many pages on changing text selection colors giving the code you tried, but none on changing selection colors in input fields…
February 26, 2010 at 11:23 am #71645TheDoc
MemberJust to make sure everyone is on the same page, the OP is referring to this:
February 27, 2010 at 1:12 am #71715psychotronic
Memberthank you all for the helps, i really appreciate it ;)
"virtual" wrote:Well unless I am misunderstanding you again, how about this
http://www.cssplay.co.uk/menu/form.html
No.1 CSS Play has a background image in the input boxes and No. 5 changes on hover.sorry, it doesn’t work virtual. It just changing the input background, not the selection colors
"TheDoc" wrote:Just to make sure everyone is on the same page, the OP is referring to this:Yes, it’s working good with p, div etc, but not with the selection color of input fields.
Please see the image below :
[img]http://img132.imageshack.us/img132/125/ikoko.png[/img]this is my styling code :
Code:It wrks properly with the <p> and other html element, but not with the input field / text area
February 27, 2010 at 3:06 pm #71746TheDoc
MemberI don’t think you actually can. If you look at CSS-Tricks, you’ll see that all of the input areas use a standard blue.
February 28, 2010 at 12:10 pm #71759psychotronic
Member"TheDoc" wrote:I don’t think you actually can. If you look at CSS-Tricks, you’ll see that all of the input areas use a standard blue.Yup I see. How about using javascript. Is it possible?
thanks
August 1, 2012 at 9:23 pm #107196JoshuaJamesBeal
MemberYou are forgetting the color!
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.