Hi,

I've spotted this while validating my websites with http://validator.w3.org.
For example, if you attempt to validate http://www.sytru.com/ which is using Views to display the front page results you'll end up with the following validation error:

Line 108, Column 88: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag.

…iew-display-id-default view-dom-id-1">


The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Can you please correct this in the next version of Views?

Thanks,
s

Comments

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

Correct what? You give a tiny fragment of HTML. How do I know you didn't foolishly put your view inside a span tag and are blaming the module for it?

nrackleff’s picture

Version: 6.x-2.3 » 6.x-2.6

I am having the same problem. Here is the code generated by the view:


<div class="views-field-field-technote-file-fid">
    <span class="field-content">
        <div class="filefield-icon field-icon-application-pdf"><img class="field-icon-application-pdf"  alt="application/pdf icon" src="/sites/all/modules/filefield/icons/protocons/16x16/mimetypes/application-pdf.png" /></div>
       <a href="AminoAcids-Feb2004.pdf" type="application/pdf; length=72583" title="AminoAcids-Feb2004.pdf" target="_blank">Analysis of Amino Acids That Induce Metabolic Errors</a> (size 70.88 KB)
   </span>
</div>

I am using Views 6.x-2.6 and using Fields to create the view. I do not have 'inline' checked for any fields in the view. Is there any way to change the 'span class="field-content"' to div class="field-content"'?

Please let me know if you need any more information. Thanks for your help.

merlinofchaos’s picture

Search the CCK queue -- it is what sets a field as block/inline for the span/div. You can override this in the templates (see theme: information to see what the templates are/do and see the advanced help for some information about using them)

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

No updates for more than 30 days.