Aide fond fixe html
adamo12323
Messages postés
14
Date d'inscription
Statut
Membre
-
notobe Messages postés 2222 Statut Membre -
notobe Messages postés 2222 Statut Membre -
Bonjour Jai essayer de mettre un fond fixe mais ca ne fonctione pas :( :S
<body>
<script language="JavaScript1.2">
if (document.all||document.getElementById)
document.body.style.background="url('MON FOND.jpg') white center no-repeat fixed"
</script>
</body>
Ca marche pas avec ce script quelqun peut m'aider ?
www.t4ctnt.fr.st/intro.html
<body>
<script language="JavaScript1.2">
if (document.all||document.getElementById)
document.body.style.background="url('MON FOND.jpg') white center no-repeat fixed"
</script>
</body>
Ca marche pas avec ce script quelqun peut m'aider ?
www.t4ctnt.fr.st/intro.html
5 réponses
-
Salut !
T'as pas besoin de passer par les scrpits pour faire cela... Il te suffit de rajouter un attribut dans ta balise body :<body bgcolor="#FFFFFF" background="images/monImage.jpg" bgproperties="fixed">
A+
Si à gauche j'ai l'amont, c'est bon...
Si à gauche j'ai l'aval, j'suis bancal... -
-
euh quand je le fait comme ca le fond fixe ya que moi qui le voi fixe quand quelqun dautre regarde (ca depend qui) limage est multiplier en 4 et pas fixe :s
www.t4ctnt.fr.st/intro.html -
Essai avec les CSS, ça devrait mieux fonctionner:
http://openweb.eu.org/articles/overflow_fond_fixe/ -
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question -
Salut,
il y a quelques erreurs dans ton script. Voici le bon :
<script language="JavaScript">
if (document.all||document.getElementById)
document.body.style.background="url('image.jpg') fixed"
</script>
après la dernière parenthèse il faut seulement préciser fixed ou rien car en principe une image se duplique automatiquement.
Voilou !