html - Flash of unstyled content -
i've got page content pulled down database in body, in head i've got external style sheet linked format content. on safari (doesn't seem happen on chrome or firefox) i'm getting lovely flash of unstyled content.
i'd rather have non-javascript fix this, there way position external css sheet link gets applied before php script runs in body? - assume being @ top in head automatically, apparently not in safari, ideas?
<?php require_once "../config/article_functions.php"; include "../widgets/topborder.html"; include "../widgets/banner.php"; include "../widgets/navbar.html"; ?> <!doctype html> <html> <head> <link rel="stylesheet" type="text/css" href="http://example.org/widgets/article.css"> <style type="text/css"> a:link {color: inherit;} /* unvisited link */ a:visited {color: inherit;} /* visited link */ a:hover {color: inherit;} /* mouse on link */ a:active {color: inherit;} /* selected link */ body, html { margin: 0; padding: 0; height:900px; } #container { width:990px; height:1000px; margin-left:auto; margin-right:auto; } #news_container { width:740px; } </style> <title> todo </title> </head> <body> <div id="container"> <?php include "../widgets/sidepanel.html"; ?> <div id = "news_container"> <?php $uri = explode('/', $_get['$url']); get_selected_news($uri[0]); ?> </div> </div> </body> </html>
for second or see this:
then afterwards:
<?php include "../widgets/topborder.html"; include "../widgets/navbar.html"; ?> <!doctype html> <html> <head> …
bad boy! no wonder safari confused when gets html before doctype declaration. maybe gets closing </html>
tag before see stylesheet?
Comments
Post a Comment