I have got a design that uses php includes, on the top file which has my header and a google banner it keeps coming up with this error when checking for errors. 'Line 11 column 78: document type does not allow element "TABLE" here.' The code is <style type="text/css"> /*<![CDATA[*/ body { background-color: #242424; } div.c3 {text-align: right} td.c2 {border: 1px solid #5f5f5f;border-top-width:0px;border-left-width:0px;border-right-width:0px;} td.c1 {border: 1px dotted #000000} /*]]>*/ </style> <table width="800" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td colspan="9"><img src="images/layout_01.gif" width="800" height="143" alt="" /></td> </tr> <tr> <td colspan="9"><img src="images/layout_10.gif" width="800" height="2" alt="" /></td> </tr> <tr> <td colspan="9"><img src="images/layout_11.gif" width="800" height="1" alt="" /></td> </tr> <tr> <td colspan="9" bgcolor="#ABABAB"> <table cellpadding="3" cellspacing="0" width="100%"> <tr> <td align="center"> <script type="text/javascript"><!-- google_ad_client = "pub-8178224563442432"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text"; google_ad_channel =""; google_color_border = "ABABAB"; google_color_bg = "ABABAB"; google_color_link = "FFFFFF"; google_color_text = "FFFFFF"; google_color_url = "FFFFFF"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </td> </tr> </table> <table cellpadding="0" cellspacing="5" width="100%"> <tr> </tr> </table> </td> <tr> <td><img src="images/spacer.gif" width="81" height="1" alt="" /></td> <td><img src="images/spacer.gif" width="77" height="1" alt="" /></td> <td><img src="images/spacer.gif" width="27" height="1" alt="" /></td> <td><img src="images/spacer.gif" width="80" height="1" alt="" /></td> <td><img src="images/spacer.gif" width="109" height="1" alt="" /></td> <td><img src="images/spacer.gif" width="107" height="1" alt="" /></td> <td><img src="images/spacer.gif" width="112" height="1" alt="" /></td> <td><img src="images/spacer.gif" width="86" height="1" alt="" /></td> <td><img src="images/spacer.gif" width="121" height="1" alt="" /></td> </tr> </table> Code (markup): Obviously as its just a include I got told not to include head and body and stuff, the line in question is the <table width="800" border="0" cellpadding="0" cellspacing="0" align="center"> Code (markup): Any ideas pls? Thnx
I believe it has something to do with the fact that the style is supposed to be within the <head> </head> . In one of my websites I have part of the head inside my header.php include and have never had any problems or errors as a result of it.
Hmm, I got told not to do that on an include as if a <head> is in the include and in the main file then you are gonna have two <heads> ?
do you already have a <head> in front of the <style>? is a just a case of a missing </head> between the </style> and <table>?
Not on the include no as I have a <head> tag on the main index, so if I put one in the include then surely I'd have two <head> tags showing up?
If your include statement lies in the head, table is not allowed. If the include is in the body, style is not allowed. So, you cannot have the snippet as you have it. cheers, gary
You don't need to take it out, you need to put it in the proper place. A link (preferred) or the full source would be helpful. Please indicate where the include statement lives. cheers, gary
No you cannot have two heads. Thats not what I was implying. the head can only be in one place, BUT the style must be within the head.