...

View Full Version : force <pre> to not change font style



wac
02-18-2004, 08:18 PM
When I use <pre> the font style changes from what would normally be used. Is there a way to tell <pre> to use the same font style as the rest of the page???

Roy Sinclair
02-18-2004, 08:24 PM
Yes, style it with a style sheet (tested using Mozilla).



<style type="text/css">
pre { font-family: inherit; }
</style>



Of course IE ignores that code so for compatability you'll have to specify the same font-family as the rest of the page instead of using the simple "inherit" construct.

wac
02-18-2004, 09:12 PM
Thanx Roy.
Currently, I don't specify the font family. I let the user set things via the browser preferences. But if that's the only way (cause right now I am using IE6) then I'll do that... Thanx again



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum