Click to See Complete Forum and Search --> : HTML Display/Font Size Problems


WebFreedom
11-26-2005, 04:37 AM
Hi All,

I'm a relatively new HTML'r, and I'm having some challenges with my code that I can't resolve. Here's the relevant piece of code:

~-~-~-~-~

<html>
<head>
<title><xsame%KEYWORD1/2%></xsame></title>
<meta name="keywords" content="<xsame%KEYWORD1/2%>"
<meta name="description" content="The Internet's DEFINITIVE Source for <xsame%KEYWORD1/2%> Resources and Information."
</head>

<body>
<table width="682"><tr><td><font face="Tahoma" size="3">
<h1 align="center">Information On <u><xsame%KEYWORD1/2%></u></h1>

<table border="0" cellspacing="0" cellpadding="10" align="right"><tr><td>
<img src="Image01.jpg" img alt="<xsame%KEYWORD1/2%> Graphic" border="0">
</td></tr>

~-~-~-~-~

I'm encountering the following two problems:

1. When I display the .htm page created with this code, there's roughly a one-inch gap between the top of my browser window (below the toolbars) and the beginning of the displayed text. This happens in both IE and Firefox.

2. Regardless of how I set the font size, it's always significantly larger in Firefox than in IE.

Thanks in advance for any helpful input. :) I can provide more code or information if necessary, as well.

Sam

Charles
11-26-2005, 04:51 AM
1) Tables should not be used for layout. Use CSS instead.

2) Make friends with The Validator (http://validator.w3.org/).

WebFreedom
11-26-2005, 05:14 AM
Hi Charles,

Thanks for posting an answer so quickly. I may have questions about your answers, but I'm going to see what I can figure out on my own first.

Sam

Fang
11-26-2005, 06:00 AM
1. Headings (h1-h6) have different margins in IE and FF as does the body and html (margin, border and padding)

2. Look at the View > Text Size settings in both browsers.

WebFreedom
11-26-2005, 06:19 AM
Hi Fang,

I must say that your answer to Question 2 led to a much simpler solution. Good call. ;)

On Question 1...this problem (1" top margin) appears in both IE and Firefox. Is there a way to set the margins for the <html> and/or <body> tags? I tried <html margin="0">, etc., but it didn't change anything. Or do you think it's the <h1> tag that's causing the problem?

Rookie mistakes, I'm sure, but I'm this close to finishing my pages...

Thanks,
Sam

Fang
11-26-2005, 07:21 AM
A 1" gap is probably due to <h1><h1 style="margin:0;">bla</h1>
Read the first 3 tutorials (http://www.w3schools.com/default.asp)