开发者

Validation Question

I get the following error when using the w3c validator why?

 Line 54, Column 9: No li element in list scope but a li end tag seen.
                </li><!-- LI Close -->

Code

<!DOCTYPE html>
<html lang="en">
<head>
    <title><?php echo $name; ?> : Nationwide Housemovers</title>
    <link href="<?php echo base_url()?>includes/css/adminstyle.css" rel="stylesheet" type="text/css" media="screen" />
    <link href='http://fonts.googleapis.com/css?family=Josefin+Slab' rel='stylesheet' type='text/css'>
    <script type="text/javascript" src="<?php echo base_url() ?>includes/js/ckedit/ckeditor.js"></script>   
</head>
<body>

    <div id ="wrapper">

        <div id="header">

            <h1 id="companyName">Housemovers Ltd </h1>
            <h4 id="companyQuote">""</h4>

        </div>
        <div id ="leftCol">
 <nav>
        <ul>
        <?php if($this->session->userdata('logged_in')): ?>
            <li><?php echo anchor('admin/dashboard', 'Dashboard');?></li>
            <li><a>Edit Pages</a>
                <?php if(is_array($cms_pages)): ?>
                <ul>
                    <?php foreach($cms_pages as $page): ?>
                <li><a href="<?=base_url();?>admin/editpage/index/<?= $page->id ?>/<?php echo url_title($page->name,'dash', TRUE); ?>"><?=$page->name?></a></li>
                    <?php endforeach; ?>

                </ul> <!-- UL Close -->
                <?php endif; ?>
            </li> <!-- Edit Close -->

            <li><a&开发者_开发百科gt;Gallery</a>
                <ul>
                <li><?php echo anchor('admin/addimage','Add Image');?></li>
                <li><?php echo anchor('admin/deleteimage','Delete Image');?></li>
                </ul>
            </li> <!-- Gallery Close -->

            <li><a>Sales</a>
            <ul>
                <li><?php echo anchor('admin/addsale','Add Sale');?></li>
                <li><a>Edit Sale</a>
                            <?php if(is_array($sales_pages)): ?>
                                    <ul>
                                        <?php foreach($sales_pages as $sale): ?>
                                        <li><a href="<?=base_url();?>admin/editsale/index/<?= $sale->id ?>/<?php echo url_title($sale->name,'dash', TRUE); ?>"><?=$sale->name?></a></li>
                                        <?php endforeach; ?>
                                    </ul>
                                <?php endif; ?>
                                </li><!-- LI Edit Sale Close -->
                </li><!-- LI Close -->
                <li><?php echo anchor('#','Delete Sale');?></li>
            </ul><!-- UL Close -->

            <li><?php echo anchor('admin/home/logout','Log Out');?></li>
        <?php else: ?>
        <?php redirect('admin/home'); ?>
            <?php endif; ?>
        </ul>
 </nav>
        </div><!--leftCol End -->

        <section id="content">

            <?=$content?>

        </section>

        <footer>

            <p>&copy; Houses LTD <?php echo date('Y');?></p>

        </footer>
    </div>

</body>
</html>


There's an extra </li>

<li><a>Edit Sale</a>
    <?php if(is_array($sales_pages)): ?>
        <ul>
        <?php foreach($sales_pages as $sale): ?>
        <li>
            <a href="<?=base_url();?>admin/editsale/index/<?= $sale->id ?>/<?php echo url_title($sale->name,'dash', TRUE); ?>"><?=$sale->name?></a>
        </li>
        <?php endforeach; ?>
        </ul>
    <?php endif; ?>
</li><!-- LI Edit Sale Close -->
<!-- Right here you have two closing end tags for <li>-->
</li><!-- LI Close -->
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜