Mettre une image de fond
leroishazz
-
animostab Messages postés 3003 Statut Membre -
animostab Messages postés 3003 Statut Membre -
Bonjour,
j'aimerais savoir comment mettre une image de fond sur ce code
@charset "utf-8";
/* CSS par Blackers */
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #A5A2A9;
margin: 0;
padding: 0;
text-align: center;
color: #ffffff;
font-size: 12px;
}
#site {
text-align:left;
width: 802px;
margin: auto;
border: 1px solid #000000;
background: #737373;
}
#header {
background: #737373 url(images/header.jpg) no-repeat;
margin: 0;
padding: 0;
height: 260px;
}
#header h1 {
margin: 0;
padding: 10px 0;
}
#contenu {
padding: 20px;
}
div#left {
float: left;
width: 518px;
margin: 0px;
padding: 0px;
margin-bottom: 25px;
margin-left: 10px;
}
div#right {
width:199px;
float:left;
margin-bottom: 25px;
margin-left: 30px;
}
div#bloc{
border:solid 1px #000000;
margin-left:0;
margin-right:15px;
background: #737373 url(images/news.jpg) no-repeat;
padding-top: 30px;
padding-bottom: 15px;
padding-right: 18px;
padding-left: 18px;
}
div#menu{
border:solid 1px #000000;
margin-left:0;
margin-right:15px;
background: #737373 url(images/menu.jpg) no-repeat;
padding-top: 50px;
padding-bottom: 15px;
padding-right: 18px;
padding-left: 18px;
}
div#menu a{
color: #ffffff;
text-decoration:none;
}
div#menu ul{
margin:0px;
padding:15px;
list-style-image: url ("images/fleche.gif");
}
div#menu li{
list-style-image: url ("images/fleche.gif");
padding-bottom: 8px;
}
#footer {
margin-left: 30px;
margin-right: 30px;
margin-bottom: 25px;
border:solid 1px #000000;
height: 30px;
clear: both;
}
#footer p {
padding:8px;
margin:0px;
text-align: center;
}
img { border: 0; }
cordialement .
j'aimerais savoir comment mettre une image de fond sur ce code
@charset "utf-8";
/* CSS par Blackers */
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #A5A2A9;
margin: 0;
padding: 0;
text-align: center;
color: #ffffff;
font-size: 12px;
}
#site {
text-align:left;
width: 802px;
margin: auto;
border: 1px solid #000000;
background: #737373;
}
#header {
background: #737373 url(images/header.jpg) no-repeat;
margin: 0;
padding: 0;
height: 260px;
}
#header h1 {
margin: 0;
padding: 10px 0;
}
#contenu {
padding: 20px;
}
div#left {
float: left;
width: 518px;
margin: 0px;
padding: 0px;
margin-bottom: 25px;
margin-left: 10px;
}
div#right {
width:199px;
float:left;
margin-bottom: 25px;
margin-left: 30px;
}
div#bloc{
border:solid 1px #000000;
margin-left:0;
margin-right:15px;
background: #737373 url(images/news.jpg) no-repeat;
padding-top: 30px;
padding-bottom: 15px;
padding-right: 18px;
padding-left: 18px;
}
div#menu{
border:solid 1px #000000;
margin-left:0;
margin-right:15px;
background: #737373 url(images/menu.jpg) no-repeat;
padding-top: 50px;
padding-bottom: 15px;
padding-right: 18px;
padding-left: 18px;
}
div#menu a{
color: #ffffff;
text-decoration:none;
}
div#menu ul{
margin:0px;
padding:15px;
list-style-image: url ("images/fleche.gif");
}
div#menu li{
list-style-image: url ("images/fleche.gif");
padding-bottom: 8px;
}
#footer {
margin-left: 30px;
margin-right: 30px;
margin-bottom: 25px;
border:solid 1px #000000;
height: 30px;
clear: both;
}
#footer p {
padding:8px;
margin:0px;
text-align: center;
}
img { border: 0; }
cordialement .
A voir également:
- Mettre une image de fond
- Comment mettre une vidéo en fond d'écran - Guide
- Enlever le fond d'une image - Guide
- Mettre une image en fond sur word sur une seule page - Guide
- Légender une image - Guide
- Image iso - Guide
1 réponse
c'est facile
tu crée une image que tu mets par exemple dans ton dossier images
puis dans body {}
background-image: url(images/image de fond.jpg);
si ton css est dans un dossier
background-image: url(../images/image de fond.jpg);
il y a d'autres propriétés que tu peux rajouter
http://css.mammouthland.net/image-de-fond-background-css.php
https://www.zonecss.fr/proprietes-css/background-size-css.html#background-size
tu crée une image que tu mets par exemple dans ton dossier images
puis dans body {}
background-image: url(images/image de fond.jpg);
si ton css est dans un dossier
background-image: url(../images/image de fond.jpg);
il y a d'autres propriétés que tu peux rajouter
http://css.mammouthland.net/image-de-fond-background-css.php
https://www.zonecss.fr/proprietes-css/background-size-css.html#background-size