par
bzayid » 06 juil. 2005, 12:30
Voici le code de la page html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>TITRE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="css_html.css" rel="stylesheet" type="text/css" /> //remplacer par css.php pour la css contenant le php
</head>
<body>
<div id="conteneur1">
<div id="conteneur2">
<div id="header">
<p>LOGO</p>
<p>DESCRIPTION</p>
<br />
</div>
<div id="haut">
<ul class="menuhaut">
<li>lien1</li>
<li>lien2</li>
<li>lien3</li>
<li>lien4</li>
<li>lien5</li>
<li>lien6</li>
</ul>
</div>
<div id="gauche"></div>
<div id="incrustationgauche"> <img src="images/scientifique.jpg" alt="scientifique" border="0" width="140px" />
</div>
<div id="droite">
</div>
<div id="centre">
<p class="menucentre_titre">TITRE DE LA PAGE</p>
<p>TEXTE</p>
</div>
<div id="pied">
<p>PIED DE PAGE</p>
</div>
</div>
</div>
</body>
Voici le code de la css:
(supprimer les parties php et remplacer les variables par des valeurs pour la css html)
<?php
include ("connect.inc");
$table_css="css";
$rq="SELECT body_color, body_font, body_font_color, contener_border_color, navigation_background_color FROM $table_css WHERE site_accn='$site_accn'";
$sq=mysql_query($rq);
while ($ligne=mysql_fetch_array($sq)) {
$color=$ligne['body_color'];
$font=$ligne['body_font'];
$font_color=$ligne['body_font_color'];
$cont_bdr_color=$ligne['contener_border_color'];
$nav_bgd_color=$ligne['navigation_background_color'];
}
?>
body {
font-family: <?php echo $font; ?>;
font-size: 0.8em;
color: <?php echo $font_color; ?>;
background-color: <?php echo $color; ?>;
margin: 0;
padding: 0;
}
a:hover {
color: #CC0000;
text-decoration: none;
}
#conteneur1 {
position: absolute;
width: 90%;
margin: 20px 35px 35px 35px;
padding: 15px;
background-color: #FFFFFF;
}
#conteneur2 {
width: 98%;
margin: 5px;
padding: 0px;
background-color:#FFFFFF;
border: 3px solid <?php echo $cont_bdr_color; ?>;
}
#header {
height: 80px;
background-color: #FFFFFF;
text-align: center;
margin-top: 20px;
}
#haut {
background-color: <?php echo $nav_bgd_color; ?>;
border: 1px solid #CEAA18;
text-align: center;
margin: 20px 15px 10px 15px;
height: 25px;
}
#centre {
background-color:#FFFFFF;
margin-left: 170px;
margin-right: 170px;
text-align: justify;
padding: 15px;
margin-top: 27px;
}
#gauche {
float: left;
left: 0px;
margin-top: 20px;
width: 150px;
padding: 15px;
}
#incrustationgauche {
float: left;
right:0;
margin-top: 20px;
width: 150px;
padding: 15px;
}
#droite {
float: right;
right:0;
margin-top: 20px;
width: 150px;
padding: 15px;
text-align: center;
}
#pied {
clear: both;
height: 80px;
margin-top: 30px;
background-color: #FFFFFF;
text-align: center;
}
.menuhaut {
list-style-type: none;
margin: 0px;
padding: 5px;
}
.menuhaut li {
display: inline;
}
.menuhaut a {
margin: 0 3px;
color: #003366;
font-weight: bold;
text-decoration: none;
}
.menuhaut a:hover {
text-decoration: none;
font-weight: bold;
color: #CC0000;
}
.header_titre {
font-weight: bold;
}
.menugauche {
list-style-type: square;
margin: 0;
padding: 0px 10px 0px 15px;
list-style-image: url(images/fleche.gif);
}
.menugauche_titre {
font-weight: bold;
text-decoration: underline;
}
.menugauche li {
margin-bottom: 5px;
}
.menugauche a {
margin: 0;
text-decoration: none;
}
.menugauche a:hover {
text-decoration: none;
color: #CC0000;
}
.menucentre_titre {
font-weight: bold;
color: #CC0000;
font-size: 1.3em;
}
p {
margin: 0 0 15px 0;
}
.gras {
font-weight: bold;
margin: 0 0 15px 0;
}
.italique {
font-style: italic;
margin: 0 0 15px 0;
}
.tableau {
text-align: left;
background-color: #E2E2E2;
border: 1px solid #CCCCCC;
margin: 0px 0px 30px 0px;
vertical-align: top;
}
[b]Voici le code de la page html:[/b]
[php]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>TITRE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="css_html.css" rel="stylesheet" type="text/css" /> //remplacer par css.php pour la css contenant le php
</head>
<body>
<div id="conteneur1">
<div id="conteneur2">
<div id="header">
<p>LOGO</p>
<p>DESCRIPTION</p>
<br />
</div>
<div id="haut">
<ul class="menuhaut">
<li>lien1</li>
<li>lien2</li>
<li>lien3</li>
<li>lien4</li>
<li>lien5</li>
<li>lien6</li>
</ul>
</div>
<div id="gauche"></div>
<div id="incrustationgauche"> <img src="images/scientifique.jpg" alt="scientifique" border="0" width="140px" />
</div>
<div id="droite">
</div>
<div id="centre">
<p class="menucentre_titre">TITRE DE LA PAGE</p>
<p>TEXTE</p>
</div>
<div id="pied">
<p>PIED DE PAGE</p>
</div>
</div>
</div>
</body>
[/php]
[b]Voici le code de la css:[/b]
(supprimer les parties php et remplacer les variables par des valeurs pour la css html)
[php]
<?php
include ("connect.inc");
$table_css="css";
$rq="SELECT body_color, body_font, body_font_color, contener_border_color, navigation_background_color FROM $table_css WHERE site_accn='$site_accn'";
$sq=mysql_query($rq);
while ($ligne=mysql_fetch_array($sq)) {
$color=$ligne['body_color'];
$font=$ligne['body_font'];
$font_color=$ligne['body_font_color'];
$cont_bdr_color=$ligne['contener_border_color'];
$nav_bgd_color=$ligne['navigation_background_color'];
}
?>
body {
font-family: <?php echo $font; ?>;
font-size: 0.8em;
color: <?php echo $font_color; ?>;
background-color: <?php echo $color; ?>;
margin: 0;
padding: 0;
}
a:hover {
color: #CC0000;
text-decoration: none;
}
#conteneur1 {
position: absolute;
width: 90%;
margin: 20px 35px 35px 35px;
padding: 15px;
background-color: #FFFFFF;
}
#conteneur2 {
width: 98%;
margin: 5px;
padding: 0px;
background-color:#FFFFFF;
border: 3px solid <?php echo $cont_bdr_color; ?>;
}
#header {
height: 80px;
background-color: #FFFFFF;
text-align: center;
margin-top: 20px;
}
#haut {
background-color: <?php echo $nav_bgd_color; ?>;
border: 1px solid #CEAA18;
text-align: center;
margin: 20px 15px 10px 15px;
height: 25px;
}
#centre {
background-color:#FFFFFF;
margin-left: 170px;
margin-right: 170px;
text-align: justify;
padding: 15px;
margin-top: 27px;
}
#gauche {
float: left;
left: 0px;
margin-top: 20px;
width: 150px;
padding: 15px;
}
#incrustationgauche {
float: left;
right:0;
margin-top: 20px;
width: 150px;
padding: 15px;
}
#droite {
float: right;
right:0;
margin-top: 20px;
width: 150px;
padding: 15px;
text-align: center;
}
#pied {
clear: both;
height: 80px;
margin-top: 30px;
background-color: #FFFFFF;
text-align: center;
}
.menuhaut {
list-style-type: none;
margin: 0px;
padding: 5px;
}
.menuhaut li {
display: inline;
}
.menuhaut a {
margin: 0 3px;
color: #003366;
font-weight: bold;
text-decoration: none;
}
.menuhaut a:hover {
text-decoration: none;
font-weight: bold;
color: #CC0000;
}
.header_titre {
font-weight: bold;
}
.menugauche {
list-style-type: square;
margin: 0;
padding: 0px 10px 0px 15px;
list-style-image: url(images/fleche.gif);
}
.menugauche_titre {
font-weight: bold;
text-decoration: underline;
}
.menugauche li {
margin-bottom: 5px;
}
.menugauche a {
margin: 0;
text-decoration: none;
}
.menugauche a:hover {
text-decoration: none;
color: #CC0000;
}
.menucentre_titre {
font-weight: bold;
color: #CC0000;
font-size: 1.3em;
}
p {
margin: 0 0 15px 0;
}
.gras {
font-weight: bold;
margin: 0 0 15px 0;
}
.italique {
font-style: italic;
margin: 0 0 15px 0;
}
.tableau {
text-align: left;
background-color: #E2E2E2;
border: 1px solid #CCCCCC;
margin: 0px 0px 30px 0px;
vertical-align: top;
}
[/php]