[FX.php List] PHP echo breaks CSS

Tim 'Webko' Booth tim at nicheit.com.au
Wed Apr 16 18:36:25 MDT 2008


On 17/04/2008, at 2:06 AM, Jonathan Schwartz wrote:

> Hi Folks,
>
> I've noticed that having PHP echo something at the top of a page  
> (before html tag) will often mess up text size on the remainder of  
> the page.
>
> I'd like to understand what is happening.

It is definitely a side-effect of non-compliant html in some browsers:

Error: An error here
<html><head></head><body>
Lotsa html including CSS here
</body>
</html>

= Confused browser

IE will generally cope, as it breaks enough standards anyway but more  
compliant browsers will get confused at this point.

Happens to me all the time during testing, no production page is ever  
going to have the issue, so not something I get fussed about.


More information about the FX.php_List mailing list