Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Pessoal, estou com um problema na validação de uma loja virtual em Opencart 1.5.4 no w3c. Foram acusados 30 e vários deles estão relacionados ao menu do site. Tenho certeza que o a solução é simples, mas é a minha ignorância está maior que a solução.
O erro que está sendo acusado pelo w3c é o seguinte:
Line 97, Column 12: document type does not allow element "li" here; missing one of "ul", "ol" start-tag
<li><a href="URL DO SITE/topico">Topico<…
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>").
E o código do menu que tem essa série de erros é esse:
<?php if ($categories) { ?>
<div id="menu-holder" class="hidden-phone">
<div id="menu">
<ul>
<li><a href="<?php echo $home; ?>"><span class='home_icon'></span></a>
<?php foreach ($categories as $category) { ?>
<li><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
<?php if ($category['children']) { ?>
<div>
<?php for ($i = 0; $i < count($category['children']);) { ?>
<ul>
<?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
<?php for (; $i < $j; $i++) { ?>
<?php if (isset($category['children'][$i])) { ?>
<li><a<?php echo ($i==(count($category['children'])-1) ? " class='last_submenu_item'" : '');?> href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>
</div>
<?php } ?>
</li>
<?php } ?>
</ul>
</div>
</div>
<?php } ?>
Vocês podem me ajudar?
Desde já agradeço
Carregando comentários...