...

View Full Version : Need help with a table question



Maggiemae
02-28-2004, 05:01 AM
Hi, I am still validating my pages and this one has me stumped. I know it is something simple but I'm not finding it. When I try to validate I get this error:

document type does not allow element "DIV" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag
<div align="center">Dates

This is the table as it is on the page anf yhr only thing ahead of it is the <h1>

<table width="95%" border="1" cellspacing="0" cellpadding="4">
<tr>
<!-- Row 1 Column 1 -->
<td bgcolor="#CC6666">
<b>
<div align="center">Dates
</div> </b>
</td>
<!-- Row 1 Column 2 -->
<td bgcolor="#CC6666">
<b>
<div align="center">Weekly</div>
</b>
</td>
<!-- Row 1 Column 3 -->
<td bgcolor="#CC6666">
<b>
<div align="center">Rate</div>
</b>
</td>
<!-- Row 1 Column 4 -->
<td bgcolor="#CC6666">
<b>
<div align="center"> Availability
</div> </b>
</td>
</tr>

<tr>
<!-- Row 3 Column 1 -->
<td>
<div align="center">02/28 - 03/06</div>
</td>
<!-- Row 3 Column 2 -->
<td>
<div align="center">Saturday - Saturday</div> </td>
<!-- Row 3 Column 3 -->
<td>
<div align="center">000.00 </div>
</td>
<!-- Row 3 Column 4 -->
<td>
<div align="center">Open</div>
</td>
</tr>

me'
02-28-2004, 10:52 AM
You have <b><div ...></div></b>. <b> is an inline tag, which can never contain block-level tags like <div>. Simply swap the order of those two tags around to solve the problem:
<b><div align="center">Dates</div> </b>

becomes

<div align="center"><b>Dates</b></div>On another matter, you probably shouldn't be using <b> at all. This is because it's a presentational tag. If a program came along that converts a page into braille or speaks it out loud, what would it do with <b>? It looks like you're trying to make headers with <b>. Instead, try using one of the header tags <h1><h2><h3> ... <h6>. That would be a better solution.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum