par
orgerix » 30 mars 2007, 09:56
Bonjour,
J'ai fais plusieurs fonctions PHP qui me permettent de formater ma page en fonction du contenu.
La premeière :
Code : Tout sélectionner
function style($title=NULL)
{print('
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>'.$title.'</title>
</head>
<style type="text/css">
body {color:black;}
body,td,th {font-family: Garamond; font-size: 14px; font-weight: bold;}
a:link {text-decoration: none; font-size: 14px; font-style: normal; color: #996600;}
a:visited {text-decoration: none; font-size: 14px; font-style: normal; color: #996600;}
a:hover {text-decoration: none; font-size: 14px; font-style: italic; color: #000000;}
a:active {text-decoration: none; font-size: 14px; font-style: normal; color: #663333;}
a { font-size: 14px; font-weight: bold;}
table {border-color:#000000; border-width: 2px; border-collapse:collapse;}
td { border-width:2px; border-color:#000000; }
th { border-width:2px; border-color:#000000; }
.texte {font-size: 14px; font-weight: bold; font-family: Garamond; text-align: center; line-height: normal; vertical-align: middle;}
</style>
<body bgcolor="#FFFFCE">');}
la deuxième
Code : Tout sélectionner
function debuttable($title=NULL,$align='justify')
{print('
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>'.$title.'</title>
</head>
<style type="text/css">
body {color:black;}
body,td,th {font-family: Garamond; font-size: 14px; font-weight: bold;}
a:link {text-decoration: none; font-size: 14px; font-style: normal; color: #996600;}
a:visited {text-decoration: none; font-size: 14px; font-style: normal; color: #996600;}
a:hover {text-decoration: none; font-size: 14px; font-style: italic; color: #000000;}
a:active {text-decoration: none; font-size: 14px; font-style: normal; color: #663333;}
a { font-size: 14px; font-weight: bold;}
table {border-color:#000000; border-width: 2px; border-collapse:collapse;}
td { border-width:2px; border-color:#000000; }
th { border-width:2px; border-color:#000000; }
.texte {font-size: 14px; font-weight: bold; font-family: Garamond; text-align: center; line-height: normal; vertical-align: middle;}
</style>
<body background="fond.jpg" style=" background-position:center top; background-repeat:no-repeat ">
<table width="1000" border="0">
<tr>
<td width="105"> </td>
<td width="795">
<div style="overflow: auto; width: 790px; height: 580px; z-index:10; padding-right: 10px; text-align: '.$align.';">');}
MOn problème se situe au niveau du style CSS au niveau de table.
Alors que la deuxième fonction me donne un tebleau comme je le veux (bordure noire, avec fusion des bordures des cellules), la permière, quand je l'utilise me donne un tableau sans bordure...
Voici comment j'appelle mon tableau :
Code : Tout sélectionner
<table width='3900'>
<tr bgcolor="f4ba54">
<th width=100>en tête</th>
[...]
</tr>
<tr bgcolor='fefe9b'>
[...]
</tr>
<tr>
[...]
</tr>
</table>
Bonjour,
J'ai fais plusieurs fonctions PHP qui me permettent de formater ma page en fonction du contenu.
La premeière :
[code]function style($title=NULL)
{print('
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>'.$title.'</title>
</head>
<style type="text/css">
body {color:black;}
body,td,th {font-family: Garamond; font-size: 14px; font-weight: bold;}
a:link {text-decoration: none; font-size: 14px; font-style: normal; color: #996600;}
a:visited {text-decoration: none; font-size: 14px; font-style: normal; color: #996600;}
a:hover {text-decoration: none; font-size: 14px; font-style: italic; color: #000000;}
a:active {text-decoration: none; font-size: 14px; font-style: normal; color: #663333;}
a { font-size: 14px; font-weight: bold;}
table {border-color:#000000; border-width: 2px; border-collapse:collapse;}
td { border-width:2px; border-color:#000000; }
th { border-width:2px; border-color:#000000; }
.texte {font-size: 14px; font-weight: bold; font-family: Garamond; text-align: center; line-height: normal; vertical-align: middle;}
</style>
<body bgcolor="#FFFFCE">');}[/code]
la deuxième
[code]function debuttable($title=NULL,$align='justify')
{print('
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>'.$title.'</title>
</head>
<style type="text/css">
body {color:black;}
body,td,th {font-family: Garamond; font-size: 14px; font-weight: bold;}
a:link {text-decoration: none; font-size: 14px; font-style: normal; color: #996600;}
a:visited {text-decoration: none; font-size: 14px; font-style: normal; color: #996600;}
a:hover {text-decoration: none; font-size: 14px; font-style: italic; color: #000000;}
a:active {text-decoration: none; font-size: 14px; font-style: normal; color: #663333;}
a { font-size: 14px; font-weight: bold;}
table {border-color:#000000; border-width: 2px; border-collapse:collapse;}
td { border-width:2px; border-color:#000000; }
th { border-width:2px; border-color:#000000; }
.texte {font-size: 14px; font-weight: bold; font-family: Garamond; text-align: center; line-height: normal; vertical-align: middle;}
</style>
<body background="fond.jpg" style=" background-position:center top; background-repeat:no-repeat ">
<table width="1000" border="0">
<tr>
<td width="105"> </td>
<td width="795">
<div style="overflow: auto; width: 790px; height: 580px; z-index:10; padding-right: 10px; text-align: '.$align.';">');}[/code]
MOn problème se situe au niveau du style CSS au niveau de table.
Alors que la deuxième fonction me donne un tebleau comme je le veux (bordure noire, avec fusion des bordures des cellules), la permière, quand je l'utilise me donne un tableau sans bordure...
Voici comment j'appelle mon tableau :
[code]<table width='3900'>
<tr bgcolor="f4ba54">
<th width=100>en tête</th>
[...]
</tr>
<tr bgcolor='fefe9b'>
[...]
</tr>
<tr>
[...]
</tr>
</table>[/code]