Forum Moderators: not2easy
Try viewing the below code in Firefox, Opera, and Internet Explorer. You will see that Firefox shows the pre much smaller than the other two. Is this a Firefox bug? Is there any way around this using straight up CSS, i.e. no hacks or browser detection? Thanks.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style type="text/css">
body { font-family: Verdana; font-size: 85%; }
pre { font-size: 1.15em; }
</style>
</head>
<body><p>Hello World</p>
<pre>Hello World</pre>
</body>
</html>
Update: I figured it out. As a preview, the code is displayed using the <code> tag. When posted, there is a <font> tag around the <code> tag increasing the size.
I'm still looking for a CSS solution to the the problem.
pre, code {font:115% monospace;*font-size:100%;}
This should make the pre and code fonts the same size as your regular text, while keeping IE at 100%.