Mettre une image en arrière plan
wouah!!
-
Grandasse_ Messages postés 924 Date d'inscription Statut Membre Dernière intervention -
Grandasse_ Messages postés 924 Date d'inscription Statut Membre Dernière intervention -
Bonjour tout le monde!
j'ai crée une page web , mais en voulant mettre une image en arrière plan ,ça ne marche pas.
Je veux votre aide pour que je puisse parvenir à mettre mon image. J'ai confiance en vous.
Merci d'avance!!!! bonne journée à vous!!
voici le code html et css
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<style>
body {
font:100% ARIAL BLACK;
color: black; background-image:;
}
h1{
color:black;
text-align:center;
}
h1{
color:black;
text-align:center;
}
#entete{}
#syscolob {
width:20%;
background-color:PeachPuff;
float:right;
height:80% ;
margin-right:10%;
}
#centre{
padding: 35%;
background: purple;
width :auto;
color:white;
margin-left:10%;
margin-right:10%;
}
#footer{
position: absolute;
clear : both;
width : 78.95%;
height:20% ;
background-color:DarkGoldenrod ;
text-align:center;
margin-left:9%;
margin-right:10%;}
</style>
</head>
<body>
<div id="entete" >
<center><img src="" style="width:80%; height:20%;"></center>
</div>
<div id="wrap">
<div id="nav">
<ul>
<li><a href="systeme.php?page=balise" rel="nofollow" target="_blank">Menu1</a></li>
<li><a href="systeme.php?page=consulat" rel="nofollow" target="_blank">Menu2</a></li>
<li><a href="systeme.php?page=existence" rel="nofollow" target="_blank">Menu3</a></li>
<li><a href="systeme.php?page=sm1" rel="nofollow" target="_blank">Menu4</a> </li>
</ul>
</div>
</div>
<div id="syscolob">
<ul>
<a href="systeme.php?page=sm1" rel="nofollow" target="_blank"></a>
<a href="systeme.php?page=consulat" rel="nofollow" target="_blank"></a>
<a href="systeme.php?page=connexion" rel="nofollow" target="_blank"></a>
<a href="systeme.php?page=sm1" rel="nofollow" target="_blank"></a>
</ul>
</div>
<div id="centre">
<h1></h1>
<p></P>
<?php
if(!isset($_GET['page'])) ;
else if($_GET['page'] == 'balise') { include('balise.php'); }
else if($_GET['page'] == 'accord') { include('accord.php'); }
else if($_GET['page'] == 'existence') { include('existence.php'); }
else if($_GET['page'] == 'sm1') { include('sm1.php'); }
else if($_GET['page'] == 'sm1') { include('sm1.php'); }
else if($_GET['page'] == 'consulat') { include('consulat.php'); }
else if($_GET['page'] == 'connexion') { include('connexion.php'); }
else if($_GET['page'] == 'sm1') { include('sm1.php'); }
?>
</div>
<center><div id="footer">
<h1></h1>
<br>
<P>@ copyright 2015<br>
Benin Cotonou</P>
</div></center>
j'ai crée une page web , mais en voulant mettre une image en arrière plan ,ça ne marche pas.
Je veux votre aide pour que je puisse parvenir à mettre mon image. J'ai confiance en vous.
Merci d'avance!!!! bonne journée à vous!!
voici le code html et css
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<style>
body {
font:100% ARIAL BLACK;
color: black; background-image:;
}
h1{
color:black;
text-align:center;
}
h1{
color:black;
text-align:center;
}
#entete{}
#syscolob {
width:20%;
background-color:PeachPuff;
float:right;
height:80% ;
margin-right:10%;
}
#centre{
padding: 35%;
background: purple;
width :auto;
color:white;
margin-left:10%;
margin-right:10%;
}
#footer{
position: absolute;
clear : both;
width : 78.95%;
height:20% ;
background-color:DarkGoldenrod ;
text-align:center;
margin-left:9%;
margin-right:10%;}
</style>
</head>
<body>
<div id="entete" >
<center><img src="" style="width:80%; height:20%;"></center>
</div>
<div id="wrap">
<div id="nav">
<ul>
<li><a href="systeme.php?page=balise" rel="nofollow" target="_blank">Menu1</a></li>
<li><a href="systeme.php?page=consulat" rel="nofollow" target="_blank">Menu2</a></li>
<li><a href="systeme.php?page=existence" rel="nofollow" target="_blank">Menu3</a></li>
<li><a href="systeme.php?page=sm1" rel="nofollow" target="_blank">Menu4</a> </li>
</ul>
</div>
</div>
<div id="syscolob">
<ul>
<a href="systeme.php?page=sm1" rel="nofollow" target="_blank"></a>
<a href="systeme.php?page=consulat" rel="nofollow" target="_blank"></a>
<a href="systeme.php?page=connexion" rel="nofollow" target="_blank"></a>
<a href="systeme.php?page=sm1" rel="nofollow" target="_blank"></a>
</ul>
</div>
<div id="centre">
<h1></h1>
<p></P>
<?php
if(!isset($_GET['page'])) ;
else if($_GET['page'] == 'balise') { include('balise.php'); }
else if($_GET['page'] == 'accord') { include('accord.php'); }
else if($_GET['page'] == 'existence') { include('existence.php'); }
else if($_GET['page'] == 'sm1') { include('sm1.php'); }
else if($_GET['page'] == 'sm1') { include('sm1.php'); }
else if($_GET['page'] == 'consulat') { include('consulat.php'); }
else if($_GET['page'] == 'connexion') { include('connexion.php'); }
else if($_GET['page'] == 'sm1') { include('sm1.php'); }
?>
</div>
<center><div id="footer">
<h1></h1>
<br>
<P>@ copyright 2015<br>
Benin Cotonou</P>
</div></center>
A voir également:
- Mettre une image en arrière plan
- Youtube en arrière plan - Guide
- Arrière plan - Guide
- Arriere plan pc - Guide
- Supprimer l'arrière plan d'une image paint - Guide
- Mettre une image en filigrane sur word - Guide
4 réponses
Salut,
Dans ton page css tu fait comme ça :
et en html :
Dans ton page css tu fait comme ça :
background-image: url("../images/tonimage.jpg");
et en html :
<body style="background-image: url("../images/tonimage.jpg");">
voici comment j'ai mis ça dans le css
<style>
body {
font:100% ARIAL BLACK;
color: black; background-image: url("../images/php elephant.jpg");
}
h1{
color:black;
text-align:center;
}
h1{
color:black;
text-align:center;
}
#entete{}
#syscolob {
width:20%;
background-color:PeachPuff;
float:right;
height:80% ;
margin-right:10%;
}
#centre{
padding: 35%;
background: purple;
width :auto;
color:white;
margin-left:10%;
margin-right:10%;
}
#footer{
position: absolute;
clear : both;
width : 78.95%;
height:20% ;
background-color:DarkGoldenrod ;
text-align:center;
margin-left:9%;
margin-right:10%;}
</style>
<style>
body {
font:100% ARIAL BLACK;
color: black; background-image: url("../images/php elephant.jpg");
}
h1{
color:black;
text-align:center;
}
h1{
color:black;
text-align:center;
}
#entete{}
#syscolob {
width:20%;
background-color:PeachPuff;
float:right;
height:80% ;
margin-right:10%;
}
#centre{
padding: 35%;
background: purple;
width :auto;
color:white;
margin-left:10%;
margin-right:10%;
}
#footer{
position: absolute;
clear : both;
width : 78.95%;
height:20% ;
background-color:DarkGoldenrod ;
text-align:center;
margin-left:9%;
margin-right:10%;}
</style>
Salut,
Le nom de ton image est "php elephant.jpg". C'est une mauvaise idée de mettre des espace dans un nom de fichier pour faire du web. Ça devient vite pénible parce que leurs liens doivent s'écrire "php%20elephant.jpg" dans l'URL, etc.
Enlève les espace, c'est plus simple. Tu mets rien ou bien un underscore «_» comme tu veux.
Le nom de ton image est "php elephant.jpg". C'est une mauvaise idée de mettre des espace dans un nom de fichier pour faire du web. Ça devient vite pénible parce que leurs liens doivent s'écrire "php%20elephant.jpg" dans l'URL, etc.
Enlève les espace, c'est plus simple. Tu mets rien ou bien un underscore «_» comme tu veux.