Mettre en background une image

Bonjour,

je souhaite mettre dans mon site une image en arriere plans ,l'image droit rester fixe

voici le css que j'ai utilisé

body{
width: 100% ;
background-image: url("images/arriere_plan.jpeg") ;
background-repeat: no-repeat;
position : fixed ;

margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
margin: 0px;
}
.page {
width: 80% ;
margin-left:10%;
margin-right: 10%;
background-color : white;

opacity:0.9;
filter:alpha(opacity=90);
}
le probleme c que quant je utilise " position : fixed ;" la page se fixe aussi

merci d'avance pour votre aide

3 réponses

  1. Contributeur
    Bonsoir,

    Il faut mettre fixed directement après l'image :

    background-image: url("images/arriere_plan.jpeg") fixed ;  


    Et retire
    position : fixed ;


    Courage, le bout du tunnel n'est pas loin, il suffit de se retourner.
    0
    1. bonjour , merci pour votre réponse
      j'ai essayer mais ca ne marche pas on m'affiche plus image !!!
      0
      1. merci j'ai trouvé la réponse

        body{
        width: 100% ;
        background-image: url("images/arriere_plan.jpeg") ;

        background-repeat: no-repeat;
        background-attachment: fixed;
        margin-top: 0px;
        margin-bottom: 0px;
        padding: 0px;
        margin: 0px;
        }
        0