The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Select content color changing

View previous topic View next topic Go down

Solved Select content color changing

Post by Ches on April 22nd 2014, 1:06 am

Hello everyone.

There's a way you can change the default color to another color?
Currently it's white, but I would like to have another color.

Kind regards,
Ches


Last edited by Ches on April 22nd 2014, 3:54 pm; edited 1 time in total

Ches
Forumember

Posts : 28
Reputation : 1
Language : Dutch, English

http://flipchat1fc.forumotion.com

Back to top Go down

Solved Re: Select content color changing

Post by Luffy on April 22nd 2014, 1:20 am

Depends of the codes you use. Please provide the codes you use to check it out.






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Select content color changing

Post by Ches on April 22nd 2014, 1:27 am

Marios94 wrote:Depends of the codes you use. Please provide the codes you use to check it out.
The codes I'm currently using are the following codes.

Javascript
Code:
function selectCode(a){a=$(a).closest("dl").find(".cont_code,code")[0];if(window.getSelection){var c=window.getSelection();if(c.setBaseAndExtent)c.setBaseAndExtent(a,0,a,a.innerText.length-1);else{window.opera&&a.innerHTML.substring(a.innerHTML.length-4)=="<BR>"&&(a.innerHTML+=" ");var b=document.createRange();b.selectNodeContents(a);c.removeAllRanges();c.addRange(b)}}else document.getSelection?(c=document.getSelection(),b=document.createRange(),b.selectNodeContents(a),
  c.removeAllRanges(),c.addRange(b)):document.selection&&(b=document.body.createTextRange(),b.moveToElementText(a),b.select())}
 
  $(function(){
  $("dl.codebox:not(.spoiler,.hidecode) > dd.code, dl.codebox:not(.spoiler,.hidecode) > dd > code").closest("dl").find('dt').append('<span onClick="selectCode(this)" class="selectCode">Select Content</span>');
  });

CSS:
Code:
.selectCode { float:right; text-transform: uppercase; cursor:pointer; }
div.cont_code { clear: right; }

Kind regards,
Ches

Ches
Forumember

Posts : 28
Reputation : 1
Language : Dutch, English

http://flipchat1fc.forumotion.com

Back to top Go down

Solved Re: Select content color changing

Post by Luffy on April 22nd 2014, 1:31 am

For the start the CSS code is wrong. The codes that are after the {} are not readable.
Remove the CSS and replace it with this code
Code:
.selectCode {
float:right;
text-transform: uppercase;
cursor:pointer;
color:#000000;
font-family:Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
div.cont_code { clear: right; }






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Select content color changing

Post by Ches on April 22nd 2014, 1:37 am

The code's I'm using were stated in this thread.
http://help.forumotion.com/t93456-select-content-button?highlight=Select+All

About the code you stated.
I tried that code before and it didn't work. But for some reason it does now.

Also, you know how to change the 'code:' color?

Kind regards,
Ches

Ches
Forumember

Posts : 28
Reputation : 1
Language : Dutch, English

http://flipchat1fc.forumotion.com

Back to top Go down

Solved Re: Select content color changing

Post by Luffy on April 22nd 2014, 1:47 am

I dont know if this will work...

Code:
dl.codebox dt {color:#FF0000;}






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Select content color changing

Post by Ches on April 22nd 2014, 1:57 am

That code doesn't work for me Sadbut thanks anyways for helping me out.
Hope I'll find where / how to change it.

Kind regards,
Ches

Ches
Forumember

Posts : 28
Reputation : 1
Language : Dutch, English

http://flipchat1fc.forumotion.com

Back to top Go down

Solved Re: Select content color changing

Post by levy on April 22nd 2014, 2:13 am

Hi,
I'm not sure about what you talk , you mean when you are select a text to change the blue color to another?

levy
Hyperactive

Male Posts : 2582
Reputation : 345
Language : Romanian, English
Location : criticize artwork, not people!

http://help.forumotion.com/

Back to top Go down

Solved Re: Select content color changing

Post by SLGray on April 22nd 2014, 2:42 am

So now you what to change the color of this part - Code:?

Please post a link to a topic on your forum that has a code in it.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36648
Reputation : 2443
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Select content color changing

Post by Pizza Boi on April 22nd 2014, 8:15 am

Hi Very Happy

Hmm... this worked for me:

Code:
dl.codebox.dt {
 color: #Color !important; /* This is the title 'code' color change - Remove this message */
}
dl.codebox code {
 color: #Color !important; /* This is the color change for the content change - Remove this message */
}

Please make sure you put this at the top of your stylesheet so that the others won't 'override' . It is also recommended that you remove previous codes that affects your select content code so that you no longer have to worry about spaces taken up by irrelevant ones .

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Select content color changing

Post by Ches on April 22nd 2014, 2:01 pm

@SLGray wrote:So now you what to change the color of this part - Code:?

Please post a link to a topic on your forum that has a code in it.

Yes, that's the part I would like to have the color changed.

Here's a link:http://flipchat1fc.forumotion.com/t585-account-activation

Ches
Forumember

Posts : 28
Reputation : 1
Language : Dutch, English

http://flipchat1fc.forumotion.com

Back to top Go down

Solved Re: Select content color changing

Post by Ches on April 22nd 2014, 2:10 pm

@Pizza Boi wrote:Hi Very Happy

Hmm... this worked for me:

Code:
dl.codebox.dt {
 color: #Color !important; /* This is the title 'code' color change - Remove this message */
}
dl.codebox code {
 color: #Color !important; /* This is the color change for the content change - Remove this message */
}

Please make sure you put this at the top of your stylesheet so that the others won't 'override' . It is also recommended that you remove previous codes that affects your select content code so that you no longer have to worry about spaces taken up by irrelevant ones .

Regards,
Pizza Boi

This code removed the current color I had, but doesn't change anything else. No matter what color code I use, it remains white for both.

Ches
Forumember

Posts : 28
Reputation : 1
Language : Dutch, English

http://flipchat1fc.forumotion.com

Back to top Go down

Solved Re: Select content color changing

Post by Pizza Boi on April 22nd 2014, 3:34 pm

Hi Very Happy

This works:
Code:
.code div.cont_code {
 color: #Color; /* Color of content - Remove this message once changed */
}

For the 'Code' word, try and see if this works (Tick it in all topics and name it anything you want)

Code:
function()
{
x = document.getElementById("dl.codebox .genmed");
x.style.color = "#Color"; // Change color here
}

Edit: I forgot to tell you that you should put that in Javascript. ACP < Modules < Javascipt Management (Make sure it's on < Paste the code above < Save

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Select content color changing

Post by Ches on April 22nd 2014, 3:41 pm

Hello Pizza Boi,

what I actually mean is that I would like to change 'Code:'
As you can see in the code you've send me 'Code:' and 'Select Content' have the same color.

On my forum, the color of Select Content is blue and the color of Code: is white. I would like to have it in the same color.

Sorry if I didn't explain it that well, I hope you understand what I mean now? Smile

Kind regards,
Ches

Ches
Forumember

Posts : 28
Reputation : 1
Language : Dutch, English

http://flipchat1fc.forumotion.com

Back to top Go down

Solved Re: Select content color changing

Post by Pizza Boi on April 22nd 2014, 3:43 pm

Hi Very Happy

Then please try this to change the color:
Code:
dl.codebox .genmed {
  color: #Color; /* Change this to the color of your select content color - Remove this after */
}

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Select content color changing

Post by Ches on April 22nd 2014, 3:50 pm

Hello Pizza Boi,

That code worked and changed the color + I managed to change the font aswell now.

Thanks alot for the help!

Kind regards,
Ches

Ches
Forumember

Posts : 28
Reputation : 1
Language : Dutch, English

http://flipchat1fc.forumotion.com

Back to top Go down

Solved Re: Select content color changing

Post by Pizza Boi on April 22nd 2014, 3:54 pm

Hi Very Happy

The pizza's here! That'd be $2.99 Wink .

No problem~

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Solved Re: Select content color changing

Post by Ches on April 22nd 2014, 3:56 pm

This has been solved and can be moved.
Thanks once again! Smile

Ches
Forumember

Posts : 28
Reputation : 1
Language : Dutch, English

http://flipchat1fc.forumotion.com

Back to top Go down

Solved Re: Select content color changing

Post by Jophy on April 22nd 2014, 4:53 pm

Solved

Jophy
ForumGuru

Male Posts : 17924
Reputation : 835
Language : English
Location : Somewhere

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum