Hello,
does anyone know how to make the following trick happen:
I want, when i select a part of the content text with the cursor, only the text to change color, while leaving the background the same? how is this done?
thanks in advance!
David - www.kovver.com - www.anthros.net
TEXT SELECTION QUESTION
Re: TEXT SELECTION QUESTION
Your wysiwyg editor should have a button to change text color. Select the text you want to have in a different color. While the text is highlighted click on the tool button and select the color you want. This will change text color only on the fly.
In FCKEditor, the icon is a T with a color bar.
In FCKEditor, the icon is a T with a color bar.
Re: TEXT SELECTION QUESTION
I thought he meant when the text was selected in the browser!
The span-element can be used to style parts of paragraphs differently through CSS.
Ronny
The span-element can be used to style parts of paragraphs differently through CSS.
Ronny
Re: TEXT SELECTION QUESTION
thanks ronny, thats what i ment. but can you give me an example in css code...RonnyK wrote: I thought he meant when the text was selected in the browser!
The span-element can be used to style parts of paragraphs differently through CSS.
Ronny
maybe for www.kovver.com
thanks in advance!
David
Re: TEXT SELECTION QUESTION
I'm sorry I misunderstood. The only way I know of to do what you want is using javascript in conjunction with your css style. So you would have a css class called ".select" that might look like this:
Then you would need to add a little javascript that would look like this:
some text some text
I'd have to open Dreamweaver and work with it to get the right code for the event, but it is doable.
Code: Select all
.select {
background-color: inherit;
color: blue;
}
some text some text
I'd have to open Dreamweaver and work with it to get the right code for the event, but it is doable.
Re: TEXT SELECTION QUESTION
i want to ipplement it in a cmsms design. should the javascript be put in the main template? and how would the javascript look like?? because i want this trick to happen on all selected text in browser.
for example like in here were you select text under the image!!!:
http://www.younggogetter.com/2007/01/22 ... galleries/
how??? please.
thanks,
David - www.kovver.com
for example like in here were you select text under the image!!!:
http://www.younggogetter.com/2007/01/22 ... galleries/
how??? please.
thanks,
David - www.kovver.com
Last edited by kovver on Fri Mar 23, 2007 7:12 am, edited 1 time in total.
Re: TEXT SELECTION QUESTION
I'm sorry, but I can't help you there. I suspect that if you searched around on the net, you'd find the javascript code. Or perhaps email the person who owns that website. I use wordpress for my journal, when I have a moment I'll have to check and see if that's a wordpress plugin.