Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rendezvouscp

macrumors 68000
Original poster
Aug 20, 2003
1,526
0
Long Beach, California
Hi, I am re-making my website, and I'm running into some problems. I have been validating my site, but I have no clue how to solve the four errors that are coming up in validation. The link is here for my validation.

Furthermore, I can't get rid of a white space at the bottom bar of the page. It seems to only happen in Windows IE 6. It looks as intended in the latest version of Safari, IE, Firefox, and Camino. I have no clue what to do to about these problems, so please help me!

Oh, and if you have any suggestions as for the design or layout of the site, please suggest. I'm open to anything right now for my website.
–Chase

Here's what's happening in Windows IE 6:

screenshot.png
 
Line 23, column 35: document type does not allow element "a" here; missing one of "th", "td" start-tag
Each <tr> is a row. for columns, each <tr> must include a properly closed <td> or <th>, even if there is only one column.
Line 44, column 83: ID "globalnav" already defined
... An "id" is a unique identifier.
Change one of the identifiers so it is unique, like the man asks :)
Line 72, column 23: there is no attribute "background"
The XHTML version you specify doesn't take background as a param. You need to use a style declaration.

As for the whitespace... eek, there's JS all over the place, man. You really want to be linking to an external file for that. That way it'd make it a lot easier to work out where IE is getting confused. Also, since you're going for XHTML, you may want to lose the <font> tags altogether. Just class your <div> and <span> elements.

Addendum: I think it's actually the font sizes which are confusing IE. Try making the generated text a little smaller.
 
Numbers 2 and 3 are because you are declaring the id of globalnav on two different elements. An id can only be used for one element per page. You should change them to classes. Number 4 is because the td tag does not support the background attribute. I haven't looked at the CSS spec to see what is the proper attribute, but that is what I would look at. Not sure on the first error. I would think that you may have forgotten to close a tag somewhere prior to that tag. The validator only shows where it gets fouled up. Sometimes the problem is actually previous to the line it indicates. I will try to look at your code and see if I can find the reason for the whitespace. good luck.
 
brap said:
Each <tr> is a row. for columns, each <tr> must include a properly closed <td> or <th>, even if there is only one column.

Ok, I've been trying out different things, but I just can't figure it out. Maybe I'm really dull, but would you mind pointing me in the right direction for that one? BTW, I got the other three errors fixed. I've used bgcolor instead of background now.
–Chase
 
rendezvouscp said:
Ok, I've been trying out different things, but I just can't figure it out. Maybe I'm really dull, but would you mind pointing me in the right direction for that one? BTW, I got the other three errors fixed. I've used bgcolor instead of background now.
–Chase
Example:
<table>
<tr>
<th>content</th>
</tr>
<tr>
<td>more content</td>
</tr>
</table>

ONLY <td>, <tbody> (IIRC) and <th> are allowed directly inside <tr>, everything else has to be nested inside one of the above. You have an <a> tag directly inside a <tr> on line 23, which is a big no-no :)
 
Yay! I love you brap (not really, but you know what I mean). The page is error free! Thank you so much, now I can work on the IE thing with a little bit more confidence that my code's a bit cleaner.
–Chase
 
Ha ha, just joking

Ok, I got the code worked out, but I forgot to look at what it looked like in real life after the last code change! Now it appears as so:

new.png


Ok, the only adjustment that is keeping me from having it look good and be error free is something in this line:

<tr><th><a href="../Dev/"><img src="top.jpg" alt="Top" width="740" height="50" border="0" /></a></th>

If I take out the "th's" then it looks good, but has that same first error. I'm sorry to be so dependant on this community for my little problem, but I don't know what to do.
–Chase
 
rendezvouscp said:
Ok, I got the code worked out, but I forgot to look at what it looked like in real life after the last code change!
Heh. Ain't that just the way.
Well, I didn't mention that the <th> tag is actually Table Head, and has a few different default styles to the regular <td>, so you may want to use the latter. If it's validated, then, I'm assuming you did close the <tr> tags, though I can't see any change at all with the validation results! - maybe if you show us the revised code, someone can give you a nudge in the right way.
It looks to be, from the page image, that you're not closing the first <tr>, and thus the table is becoming 2-columns wide. Example:
Code:
<table>
<tr>
<th>content</th>[b]<td>more content</td>[/b]</tr>
<tr>
<td>more content</td>
</tr>
</table>
This site is incredibly helpful for reference, and there's a decent XHTML tutorial on there too. Best of luck!
 
Hours later...

I wasn't putting the latest versions online, I was just loading them from my computer to the validator. But, I am (so) happy now, I got everything to work, you can look online now (if you really wanted to) at my code. I moved the top image away from that table, and put it a few lines before. Thank you very much, now all I have to work on is the IE issue.
–Chase
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.