[HTML] cherche fonction css -> inline style
Bonjour,
Je cherche une fonction permettant de tansformer une page htm avec css en une page html avec style inline:
Code:
1 2 3 4 5 6 7 8 9
| <html>
<head>
<link rel="stylesheet" href="un_style.css" type="text/css" media="all">
</head>
<body>
<div class="monstyle">
......
</div>
</body> |
avec
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| div.monstyle{
text-align: left;
background: White;
font-family: "Verdana", sans-serif;
font-size: 10pt;
padding-left: 14mm;
padding-right: 14mm;
padding-top: 14mm;
padding-bottom: 14mm;
width: 210mm;
height: 297mm;
border: thin solid #D3D3D3;
} |
donne:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| <html>
<head>
<link rel="stylesheet" href="un_style.css" type="text/css" media="all">
</head>
<body>
<div style ="
text-align: left; background: White;
font-family: 'Verdana', sans-serif;
font-size: 10pt;
padding-left: 14mm;
padding-right: 14mm;
padding-top: 14mm;
padding-bottom: 14mm;
width: 210mm;
height: 297mm;
border: thin solid #D3D3D3;">
......
</div>
</body> |
J'ai trouvé ce script http://www.groupechronos.org/email_sheet2inline_php_function.htm ( http://www.groupechronos.org/email.php?id=E3F471ZB )
Mais je n'arrive pas en tirer quelque chose en l'utilisant de la sorte çà ne me modifie rien du tout:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
<?php
require("C:/Program Files/ZMWS/4/_web.zmwsc/sheet2inline.php");
if (!$fp = fopen("test.htm","r"))
{
while(!feof($fp))
{
$Ligne = fgets($fp,255);
$Fichier .= $Ligne;
}
fclose($fp); /
echo sheet2inline($Fichier);
echo "<br>\n";
echo "<br>\n";
echo $styledefinition . "<br>\n";
echo "-----<br>\n";
echo $styletag . "<br>\n";
echo "-----<br>\n";
echo $styleclass . "<br>\n";
}
?> |
Toute aide est le bien venue ;)