By: Marco
Date: 2005-01-18
Time: 15:19
|
TinyButStrong & CSS
Hi everybody,
I have a little problem with CSS. In my template page (below) I include an external CSS. When I call this page with LoadTemplate() method, the result is an html page without CSS formatting...here is the code of the php page and the one of the html page. Any idea of where I was wrong???
Thanks
PHP page code:
<?php
require_once("../../../tiny/tbs_class.php");
$cciaa = substr($_SESSION['ente'],6);
$ente = $_SESSION['ente'];
$tbs = new clsTinyButStrong;
$scheda = '1. ORGANI';
$tbs->LoadTemplate('stampe/scheda-1.htm');
$tbs->MergeBlock('blk','mysql','SELECT * FROM sk1 WHERE Sk1_Rag1 = \''.$ente.'\'');
$tbs->Show();
?>
|
And the 'scheda-1.htm' page:
<head>
<title>unioncamere.net - Osservatorio Camerale 2005</title>
<link href="../../stileStampa.css" rel="stylesheet" type="text/css">
</head>
<body>
[blk;block=begin]
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td colspan="4"><span class="titolo">UNIONCAMERE: OSSERVATORIO CAMERALE 2005</span></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="4"><span class="titolo2">SCHEDE DI RILEVAZIONE STRUTTURE E SERVIZI CAMERALI AL 31.12.2004</span></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="4"><span class="titolo">[var.scheda]</span></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="4"><span class="cciaa">Camera di commercio industria artigianato e agricoltura di [var.cciaa]</span></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2">Presidente:</td>
<td colspan="2">[blk.Sk1_Pres]</td>
</tr>
<tr>
<td colspan="2">Segretario Generale:</td>
<td colspan="2">[blk.Sk1_Segg]</td>
</tr>
<tr>
<td colspan="2">Vice Segretari Generali:</td>
<td colspan="2">[blk.Sk1_Vsegg1]</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td colspan="2">[blk.Sk1_Vsegg2]</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td colspan="2">[blk.Sk1_Vsegg3]</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td colspan="2">[blk.Sk1_Vsegg4]</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td colspan="2">[blk.Sk1_Vsegg5]</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td colspan="2">[blk.Sk1_Vsegg6]</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2">Data constituzione Consiglio:</td>
<td colspan="2">[blk.Sk1_DtCostCon;frm='dd/mm/yyyy']</td>
</tr>
<tr>
<td colspan="2">Numero riunioni tenute nell'anno 2004:</td>
<td colspan="2">[blk.Sk1_NRiGiu]</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2">Data costituzione Collegio Revisori dei Conti:</td>
<td colspan="2">[blk.Sk1_DtCostCRC;frm='dd/mm/yyyy']</td>
</tr>
<tr>
<td colspan="2">Data scadenza Collegio Revisori dei Conti:</td>
<td colspan="2">[blk.Sk1_DtScaCRC;frm='dd/mm/yyyy']</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2">Indicare quanti tra i componenti della Giunta siano donne:</td>
<td colspan="2">[blk.Sk1_NMD]</td>
</tr>
</table>
[blk;block=end]
</body>
</html>
|
|
By: Skrol29
Date: 2005-01-18
Time: 20:59
|
Re: TinyButStrong & CSS
Hi Marco,
Your CSS file path is defined relativelly to the template path (../../stileStampa.css). But when the template is open from a PHP script placed in another folder, then the path becomes relative to the called script.
You have to take in acount that the CSS path in your HTML file is relative but for the client side, not the server side.
To make in works, you can define a path relative to the site root.
|
By: Marco
Date: 2005-01-19
Time: 09:34
|
Re: TinyButStrong & CSS
Thanks Skrol,
but the problem seems to be another one. The path to CSS file was created automatically from my HTML editor (Dreamweaver); for the page scheda-1.htm I use a Template and dreamweaver created the path by itself ...anyway there will be a solution, maybe playibg a bit with relative/absolute paths!
Thanks again
|
By: Marco
Date: 2005-01-19
Time: 09:42
|
Re: TinyButStrong & CSS
Ok, I was wrong and you were right...it was a path problem!!! I hate'em...
Thanks again
|
|
Posting in progress.
Please wait...
|