[FX.php List] PHP echo breaks CSS

Kevin Futter kfutter at sbc.melb.catholic.edu.au
Wed Apr 16 17:41:31 MDT 2008


On 17/04/08 7:37 AM, "Dale Bengston" <dbengston at tds.net> wrote:

> In practice, the CSS does get whacked in these circumstances (at least
> in Firefox). The work-around seems simple though - avoid echo-ing from
> PHP outside the confines of the html page. The only time I've seen
> this is when errors happen that are reported before the page is drawn.
> The solution is to fix what's causing the errors.
> 
> Dale

Dale's suggestion is a good one, and he hints at the cause - outputting
content before the opening HTML tag breaks the browsers's understanding of
the document structure. How the browser handles this varies per
implementation, but the messed-up font sizes is a common symptom in
Mozilla-based implementations. The solution is to simply echo errors
somewhere in the <body> element, perhaps with their own CSS styling to make
them obvious.

-- 
Kevin Futter
Webmaster, St. Bernard's College
http://www.sbc.melb.catholic.edu.au/


#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared 
by MailMarshal
#####################################################################################

This e-mail and any attachments may be confidential. You must not disclose or use the information in this e-mail if you are not the intended recipient. If you have received this e-mail in error, please notify us immediately and delete the e-mail and all copies. The College does not guarantee that this e-mail is virus or error free.  The attached files are provided and may only be used on the basis that the user assumes all responsibility for any loss, damage or consequence resulting directly or indirectly from the use of the attached files, whether caused by the negligence of the sender or not. The content and opinions in this e-mail are not necessarily those of the College.


More information about the FX.php_List mailing list