W3C home > Mailing lists > Public > www-validator@w3.org > May 2009

Php echo li-tag not seen by validator

From: Nick Woolley <nick@estores.org.uk>
Date: Thu, 28 May 2009 12:38:17 +0100
To: <www-validator@w3.org>
Message-ID: <006e01c9df88$ccda61a0$0d00000a@inspired.brooksbank.org.uk>
When the html code from the page source is pasted into a new .html file
it validates as xhtml transitional, but the .php page fails. One error I
have isolated is where I have an unordered list starting with a <ul> tag
and closed with a </ul> tag and with <li> tags opened and closed within
the <ul> tags. However the <li> tags, and the content between, are
generated in php with the command echo.
 
The workaround I've had to used is to include the following as html not
echo'd:
 
<li class="clear"></li>
 
where class 'clear' is in the stylesheet as follows:
 
..clear {
        clear:both;
        font-size:0px;
        line-height:0px;
        height:0px;
        overflow:hidden;
        margin: 0 0 0 0;
}
 
Anyone else had similar issues?
 
Thanks,
Nick
Received on Thursday, 28 May 2009 12:08:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:35 GMT