Les Allergies
Alimentaires
Posez votre question Signaler

Menu fixe en bas de page [Résolu]

malee - Dernière réponse le 13 oct. 2010 à 15:05
Bonjour,
Je souhaiterais savoir comment créer un menu fixe en bas de page,(qui est toujours visible si on redimensionne la fenêtre) dans le même idée que ce site: http://gerdarntz.org/isotype
Mon menu est un élément flash que j'insère dans une div.
Merci d'avance,
Malee.
Lire la suite 

Menu fixe en bas de page »

6 réponses
Réponse
+0
moins plus
voici un code que je vien de creer, il est creer que pour IE7 donc a toi de le retravailler sur les autres navigateurs, parceque je ne suis pas chez moi la.

<html>

<head>

<SCRIPT language="javascript">
function fPrincipale(){
document.getElementById("MonId").innerHTML="***"+sizeScreen(1)+" SCROLL: "+document.body.scrollTop;
document.getElementById("MonId").style.position="absolute";
document.getElementById("MonId").style.marginTop=(sizeScreen(1)*0.80)+document.body.scrollTop;

setTimeout("fPrincipale();",50);
}









function sizeScreen(sens){
var winW = 630, winH = 460;

if(sens ==1){
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
winW = window.innerWidth;
winH = window.innerHeight;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
}
return winH ;
}else{

if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
winW = window.innerWidth;
winH = window.innerHeight;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
}
return winW;
}
}


</SCRIPT>

</head>
<body>

<div id="MonId">
</div>
<BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR />
<BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR />
<BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR />




<SCRIPT language="javascript">
fPrincipale();
</SCRIPT>
</body>




</html>
malee - 13 oct. 2010 à 11:40
Merci dream666,

Je m'y connais pas du tout en javascript, par contre j'ai réussi à avoir mon élément fixe en bas de page avec position:fixed; en css.
Cela la fonction fixe en bas de page marche, seulement, impossible de centrer ma div, elle reste bloquée à gauche.
Si jamais tu peux m'aider..
Sinon encore merci pour ta réponse...
Ajouter un commentaire
Réponse
+0
moins plus
j'ais pas compris ce que tu demande mais soit tu passe par la balise html
<center></center> ou en css http://www.alsacreations.com/...
Ajouter un commentaire
Réponse
+0
moins plus
J'ai déjà essayée en html et en css mais ça beug quand même si tu veux voir j'ai mis ma page en ligne: http://www.la-coopa.com/presentation.html
merci beaucoup pour ton aide en tout cas...
Ajouter un commentaire
Réponse
+0
moins plus
a dsl j'avais oublier que position absolute enpecher de centrer.

<html>

<head>

<SCRIPT language="javascript">
function fPrincipale(){
document.getElementById("MonId").innerHTML="***"+sizeScreen(1)+" SCROLL: "+document.body.scrollTop;
document.getElementById("MonId").style.position="absolute";
document.getElementById("MonId").style.marginLeft=(sizeScreen(0)/2) ;
document.getElementById("MonId").style.marginTop=(sizeScreen(1)*0.80)+document.body.scrollTop;

setTimeout("fPrincipale();",50);
}









function sizeScreen(sens){
var winW = 630, winH = 460;

if(sens ==1){
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
winW = window.innerWidth;
winH = window.innerHeight;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
}
return winH ;
}else{

if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
winW = window.innerWidth;
winH = window.innerHeight;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
}
return winW;
}
}


</SCRIPT>

</head>
<body>

<div id="MonId">
</div>
<BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR />
<BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR />
<BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR />




<SCRIPT language="javascript">
fPrincipale();
</SCRIPT>
</body>




</html>
<html>

<head>

<SCRIPT language="javascript">
function fPrincipale(){
document.getElementById("MonId").innerHTML="***"+sizeScreen(1)+" SCROLL: "+document.body.scrollTop;
document.getElementById("MonId").style.position="absolute";
document.getElementById("MonId").style.marginLeft=(sizeScreen(0)/2) ;
document.getElementById("MonId").style.marginTop=(sizeScreen(1)*0.80)+document.body.scrollTop;

setTimeout("fPrincipale();",50);
}









function sizeScreen(sens){
var winW = 630, winH = 460;

if(sens ==1){
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
winW = window.innerWidth;
winH = window.innerHeight;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
}
return winH ;
}else{

if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
winW = window.innerWidth;
winH = window.innerHeight;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
}
return winW;
}
}


</SCRIPT>

</head>
<body>

<div id="MonId">
</div>
<BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR />
<BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR />
<BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR /><BR />




<SCRIPT language="javascript">
fPrincipale();
</SCRIPT>
</body>




</html>
Ajouter un commentaire
Réponse
+0
moins plus
J'ai essayer ton code ça change rien... Je comprend pas trop ce qui se passe...
c'est avec la position:fixed que ça beug, quand je change la position en absolute, la div est centrée, mais plus fixe en bas de page !
Encore merci pour ton aide!
Ajouter un commentaire
Ce document intitulé « Menu fixe en bas de page » issu de CommentCaMarche (www.commentcamarche.net) est mis à disposition sous les termes de la licence Creative Commons. Vous pouvez copier, modifier des copies de cette page, dans les conditions fixées par la licence, tant que cette note apparaît clairement.
Dossier à la une
Passage au tout numérique : quel coût pour les particuliers ?