Page 1 of 1

Validation Errors

Posted: Tue 20. Mar 2007, 11:01
by Glovebox
Hi
Can anyone help to fix these validation errors in phpwcms. I have fixed all the template errors but cannot find where to fix these.

Hallo Dose jedermann Hilfe, zum dieser Gültigkeitserklärungstörungen in den phpwcms zu regeln. Ich habe geregelt, alle Schablone Störungen aber nicht finden kann, wo man diese regelt.

Error Line 142 column 54: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

<td><font size="2"><a name="jump47"></a><div>
----------
Error Line 147 column 76: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

...dding="1" border="0" style="width: 100%;">
------------
Error Line 168 column 70: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

...0 0;padding:0;" class="spaceBeforeCP"></div><table border="0" cellspacing="0"
-------------
# Error Line 168 column 137: document type does not allow element "table" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

...pacing="0" width="1%" cellpadding="0">

Posted: Tue 20. Mar 2007, 12:11
by Jensensen
seems your code is incorrect but, with this little fragments in your posting it is hardly possible to support.

Could you send us a http://www..... to have a closer look?

Posted: Tue 20. Mar 2007, 12:28
by Glovebox

Posted: Tue 20. Mar 2007, 12:43
by marcus@localhorst
the german translation is very funny ;-)

mmh strange sourcecode with conditional comments and tables?!... anyway - I think it depends on false closed <font> tags, that must be in your templates (articlelisting template?!) take a look on it again.
replace the <font> tag by something like <span> for inline elements and <Div> for block elements.

hope that helps...
best
marcus

Posted: Tue 20. Mar 2007, 12:49
by Jensensen
from line 151 to 184

<td><font size="2"><a name="jump47"></a><div>
<h1 style="margin:0 0 5px 0;">Welcome</h1>
<h3 style="margin:0 0 5px 0;">A personal welcome and message from Scott White</h3>
<div style="margin:0">
<strong>2007-03-19</strong> <p>&nbsp;</p></div>
</div>
<table cellspacing="1" cellpadding="1" border="0" style="width: 100%;">

<tbody>
<tr>
<td valign="top"><font size="2" face="verdana,arial,helvetica,sans-serif">May I take this opportunity to offer you a warm welcome to our Scott White Training website.<br />
</font><font size="2"><font size="2" face="verdana,arial,helvetica,sans-serif"> You are a very important person to us, because we would like to think about you as a future client!</font></font><br />
<font size="2" face="verdana,arial,helvetica,sans-serif"><br />
In visiting us today, I imagine that you, like me, are seriously interested in NLP (Neuro Linguistic Programming) training courses, as a development tool for enhancing yourself and or your people?<br />
<br />

We consider ourselves unique in the area of NLP. Why? Because, unlike many other NLP providers, we do not offer the standard, practitioner, and master practitoner programmes!<br />
<br />
We have deliberately decided to offer courses for businesses, specifically tailored for their needs, incorporating selected powerful NLP techniques.<br />
<br />
Some of our training courses include, Leadership, Management, Sales, Stress, People, Team, Public Speaking, Fears, Phobias and&nbsp; Personal Skills. <br />
<br />

I am currently updating my NLP trainer skills by attending the Richard Bandler and Paul Mckenna NLP Practitioner, Master Practitioner, and NLP Trainer courses.<br />
<br />
Finally, we look forward to hearing from you soon and indeed working with you in on one of our NLP training courses in the future.<br />
<br />
Best Regards</font></td>
</tr>
</tbody>

</table><div style="margin:5px 0 0 0;padding:0;" class="spaceBeforeCP"></div><table border="0" cellspacing="0" width="1%" cellpadding="0">
<tr><td class="imagelisttd"><img src="content/images/5042997220ec5a9c72d73070c7b5dd07.jpg" width="100" height="36" border="0" class="imagelistimg" alt="scottysig.jpg" /></td></tr>
<tr><td><img src="img/leer.gif" width="1" height="5" border="0" alt="" /></td></tr>
</table></font></td>


delete code written in red.

code green: externalize styles in your CSS and validation will be ok.

code blue: a little bit "doppelt-gemoppelt" as we say in german: too much font tags (more than necessary).

test it yourself: delete all green and red marked code and it works.

more generally: you should avoid "old" <font> tags when working with CSS.

for your table it probably would be something like that:
table {
margin-bottom: 1em;
margin-top: .5em;
color: #000;
font-size: 1em;
font-family: verdana,arial,helvetica,sans-serif;
}

greetz
jensensen

Posted: Tue 20. Mar 2007, 14:03
by Glovebox
thanks guys.. however I can't find where to delete the code from, its not in backend templates. Any idea's?

Posted: Tue 20. Mar 2007, 14:28
by Jensensen
Do you use WYSIWYG Editors???

If yes, have a try without them!!!
Login --> Profile --> WYSIWYG Editor --> Turn off

But you can even customize those editors with your own style definitions. Search forum, faq, doku for a description of how to do this.
I found it some time ago....

Greetz
Jensensen

Posted: Tue 20. Mar 2007, 17:19
by DeXXus
Jensensen wrote:more generally: you should avoid "old" <font> tags when working with CSS.
More specifically, it is not valid XHTML to enclose "block-level" elements (like <table> and <div>) with an "inline" element like a <font size="2"></font> tag "pair"!
I ~believe~ it would be perfectly acceptable to remove that beginning -and- closing tag "pair" and ~instead~ place them to enclose the "actual" text within it's containing <td></td> tag "pair". You've done it ~correctly~ in the breadcrumb menu and footer. :wink:

Posted: Tue 20. Mar 2007, 19:34
by Glovebox
Thanks guys, I got it now. It was the

Code: Select all

<font size="2">{CONTENT}</font>


that was causing the 4 problems, just removed the <font>