CODE tag yields black text

mmadsen

First Post
I've noticed that the CODE tag yields black text. For example:
Code:
This text should simply be monospaced, 
in case it's programming code or ASCII 
art.  Instead, it's black and monospaced.
Here's the same CODE snippet wrapped in COLOR tags:
Code:
This text should simply be monospaced, 
in case it's programming code or ASCII 
art.  Instead, it's black and monospaced.
By the way, it's wrapped in red COLOR tags, but no color seems to do anything except guarantee that the CODE ends up white instead of black. And one size smaller. Odd...

Can we fix the settings for the CODE tag?
 

log in or register to remove this ad



The one time I used the code tag along with a color tag, it worked out nicely - admittedly, I have used the color White...

Let's see:

Code:
[color=Red]
This is a test code text.
It should be in red.
[/color]

Code:
This is a test code text.
It should be in red.
 
Last edited:


First, why is text within CODE tags black by default? Shouldn't it be white, like any other text? Second, why does it change size?
 

Odd.

Code:
[color=white]
#pragma comment(lib, "user32.lib")
#pragma comment(lib, "kernel32.lib")
#pragma comment(linker, "/filealign:512")
#pragma comment(linker, "/merge:.rdata=.data")
#pragma comment(linker, "/merge:.text=.data")
#pragma comment(linker, "/entry:main")

#define VC_EXTRALEAN
#define _WIN32_WINNT  0x0500
#define WINVER 0x0500
#include <windows.h>

HHOOK g_hHook;
LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
{
	long KeyCode = ((KBDLLHOOKSTRUCT*)lParam)->vkCode;
	if(GetKeyState(VK_SCROLL) && (KeyCode == VK_LWIN || KeyCode == VK_RWIN || KeyCode == VK_APPS))
		return 1;
	return CallNextHookEx(g_hHook, nCode, wParam, lParam);
}
 
void main()
{
	MSG Msg;
	g_hHook = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, GetModuleHandle(NULL), 0);
	while(GetMessage(&Msg, NULL, 0, 0))
		DispatchMessage(&Msg);
}
[/color]
 

Remove ads

Top