MyBB Community Forums

Full Version: Code background not getting changed Please help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello my site is grasshoppernetwork.com

please look at a sample url:
http://grasshoppernetwork.com/showthread...41#pid2441

I want to change the background color of Code to the same background color of Quote.

I have edited global.css and changed code block but changes are not reflected. I am using Geshi Syntax highlighter. Am I missing something? or are the css settings are replaced by some other setting?

[Update]

If I use " [ c o d e ] [ / c o d e ]"

Then the color is getting reflected as put in .code section of global.css but while using geshi, and if we use "[code=c]" or anything, it is getting overridden somewhere
[quote='rupam das' pid='909585' dateline='1347091464']
Hello my site is grasshoppernetwork.com

please look at a sample url:
http://grasshoppernetwork.com/showthread...41#pid2441

I want to change the background color of Code to the same background color of Quote.

I have edited global.css and changed code block but changes are not reflected. I am using Geshi Syntax highlighter. Am I missing something? or are the css settings are replaced by some other setting?

[Update]

If I use " [ c o d e ] [ / c o d e ]"

Then the color is getting reflected as put in .code section of global.css but while using geshi, and if we use "
" or anything, it is getting overridden somewhere
[/quote]

Since you have not provided a code example, I'll give you the default code.

Go to ACP > Templates & Style >Your Theme > Global.css

Find

[code]blockquote {
	border: 1px solid #ccc;
	margin: 0;
	background: #fff; <-- That's the background
	padding: 4px;
}

Now change

.codeblock {
	background: #example;
	border: 1px solid #ccc;
	padding: 4px;
}

To

.codeblock {
	background: #fff;
	border: 1px solid #ccc;
	padding: 4px;
}
(2012-09-08, 09:41 PM)Scois0n Wrote: [ -> ][quote='rupam das' pid='909585' dateline='1347091464']
Hello my site is grasshoppernetwork.com

please look at a sample url:
http://grasshoppernetwork.com/showthread...41#pid2441

I want to change the background color of Code to the same background color of Quote.

I have edited global.css and changed code block but changes are not reflected. I am using Geshi Syntax highlighter. Am I missing something? or are the css settings are replaced by some other setting?

[Update]

If I use " [ c o d e ] [ / c o d e ]"

Then the color is getting reflected as put in .code section of global.css but while using geshi, and if we use "
" or anything, it is getting overridden somewhere
[/quote]

Since you have not provided a code example, I'll give you the default code.

Go to ACP > Templates & Style >Your Theme > Global.css

Find

[code]blockquote {
	border: 1px solid #ccc;
	margin: 0;
	background: #fff; <-- That's the background
	padding: 4px;
}

Now change

.codeblock {
	background: #example;
	border: 1px solid #ccc;
	padding: 4px;
}

To

.codeblock {
	background: #fff;
	border: 1px solid #ccc;
	padding: 4px;
}

Hello Thank you for reply. I have mentioned that I have already changed the .code and .codeblock in global.css. Say if i use background=gray in .code, here is the effect.

void main()
{
printf("Hello");

}
Will appear as usual with White background / No changes observed.

but

[c o d e]

void main()
{
printf("Hello");

}
[/ c o d e]
will appear with gray back color. Observe that 2nd example is bbcode code. where as the first one is Geshi 'C' program Syntax. My Problem is If I specify any code type than default .code or .codeblock in css is not getting called.
(2012-09-09, 12:44 AM)rupam das Wrote: [ -> ]
(2012-09-08, 09:41 PM)Scois0n Wrote: [ -> ][quote='rupam das' pid='909585' dateline='1347091464']
Hello my site is grasshoppernetwork.com

please look at a sample url:
http://grasshoppernetwork.com/showthread...41#pid2441

I want to change the background color of Code to the same background color of Quote.

I have edited global.css and changed code block but changes are not reflected. I am using Geshi Syntax highlighter. Am I missing something? or are the css settings are replaced by some other setting?

[Update]

If I use " [ c o d e ] [ / c o d e ]"

Then the color is getting reflected as put in .code section of global.css but while using geshi, and if we use "
" or anything, it is getting overridden somewhere
[/quote]

Since you have not provided a code example, I'll give you the default code.

Go to ACP > Templates & Style >Your Theme > Global.css

Find

[code]blockquote {
	border: 1px solid #ccc;
	margin: 0;
	background: #fff; <-- That's the background
	padding: 4px;
}

Now change

.codeblock {
	background: #example;
	border: 1px solid #ccc;
	padding: 4px;
}

To

.codeblock {
	background: #fff;
	border: 1px solid #ccc;
	padding: 4px;
}

Hello Thank you for reply. I have mentioned that I have already changed the .code and .codeblock in global.css. Say if i use background=gray in .code, here is the effect.

void main()
{
printf("Hello");

}
Will appear as usual with White background / No changes observed.

but

[c o d e]

void main()
{
printf("Hello");

}
[/ c o d e]
will appear with gray back color. Observe that 2nd example is bbcode code. where as the first one is Geshi 'C' program Syntax. My Problem is If I specify any code type than default .code or .codeblock in css is not getting called.

There isn't a MyCode called
this
.
Hello Can anybody please give a solution for the problem?

[SOLVED!]
Quote:There isn't a MyCode called
this
.

You saved my day. I removed the plugin and Downloaded GesHi plugin that creates new BB code. I edited the main plugin and changed the background in the template code in plugin php file. Working solid:
Example:
http://grasshoppernetwork.com/showthread.php?tid=811
(2012-09-11, 02:55 AM)rupam das Wrote: [ -> ]Hello Can anybody please give a solution for the problem?

[SOLVED!]
Quote:There isn't a MyCode called
this
.

You saved my day. I removed the plugin and Downloaded GesHi plugin that creates new BB code. I edited the main plugin and changed the background in the template code in plugin php file. Working solid:
Example:
http://grasshoppernetwork.com/showthread.php?tid=811

Inadvertent as it was, glad i could help.