View Full Version : To print stylesheet instead of embedding
Pekka
3rd of October 2006 (Tue), 18:49
To print stylesheet instead of embedding (link rel):
change
<link rel="stylesheet" type="text/css" media="screen,projection" href="./stylesheet.php?style_id=<?php print $style_id; ?>&currentpage=<?php print $currentpage; ?>" />
to
<!-- <link rel="stylesheet" type="text/css" media="screen,projection" href="./stylesheet.php?style_id=<?php print $style_id; ?>&currentpage=<?php print $currentpage; ?>" /> -->
add
<style type="text/css" media="screen"><!--
<?php
$print = "1";
require("./stylesheet.php");
?>
-->
</style>
wkitty42
4th of October 2006 (Wed), 21:52
To print stylesheet instead of embedding (link rel):
ok... language barrier? by "to print" do you mean to display the sheet on the screen or is this another way of getting the stylesheet included for the browser? mind you, i've not installed/upgraded to v2, yet... i'm anxious to do so but am trying to figure out how i'd like to do it as well as letting you kill off the initial bugglets that are found ;)
Pekka
5th of October 2006 (Thu), 12:24
Print means here "adding it to resulting html page".
Link means "embedding CSS using <link rel=""> tag"
wkitty42
5th of October 2006 (Thu), 20:55
Print means here "adding it to resulting html page".
ok, so to make sure i understand it right... this would put it in the source code of the page if/when page source is viewed... right?
Link means "embedding CSS using <link rel=""> tag"
and this is the "seperate css file" (ie: foo.css) mode, right?
sorry if this is sound pedantic or clueless... just trying to ensure that it is fully understood... i'm hopeing to get started possibly this weekend... probably by moving the gallery from a "sub page" to a "sub domain"...
Pekka
5th of October 2006 (Thu), 20:59
Keep it as it is in default templates, that is the "right" way to do it cleanly.
Printing CSS on html means the stylesheet can be seen inside HEAD tag when html source is viewed.
Linking means you do not see the CSS in html source.
The difference is cosmetic, although by my tests printing CSS on html was slightly faster on some browsers - reason for this is that e.g. early Firefox did not compress external CSS code, I think now it does.
Printing CSS in html makes it easier to debug template developement.
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.