28173 sujets

CSS et mise en forme, CSS3

Bonjour tous,

Voici dequoi à l'air la page présentement http://www.socam.net/background/ (à tester avec une résolution d'au moin 1024 x 768)

Mon problème est que le background ne se répète pas à la vertical, j'aimerais qu'il apparaissent derrière le pied de page où j'ai placé le copyright.

Est-il possible de faire cela avec la façon dont j'ai construit la page?

html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SOCAM Société de communication Atikamekw-Montagnais</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="site.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
<!--[if lte IE 6]>
<style type="text/css">
div#page {
	height: 100%;
}	
</style>
<![endif]-->
</script>
</head>

<body onload="MM_preloadImages('francais_over.gif','english_over.gif','radiolive_over.gif')">

<div id="page">
	 <div id="wrapper"> 
     <div id="logo"><img src="left_banner_top.gif" width="124" height="250" alt=""/><img src="logo.jpg" width="250" height="250" alt=""/><img src="right_banner_top.gif" width="117" height="250" alt=""/></div>
     <div id="vagues"><img src="left_wave.gif" width="124" height="40" alt=""/><img src="vagues.gif" width="250" height="40" alt=""/><img src="right_wave.gif" width="117" height="40" alt=""/></div>
     <div id="francais"><img src="left_francais.gif" width="124" height="60" alt=""/><a href="http://www.socam.net/sitef/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image18','','francais_over.gif',1)"><img src="francais.gif" name="Image18" width="125" height="60" border="0" id="Image18" /></a><a href="http://www.socam.net/sitea/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image19','','english_over.gif',1)"><img src="english.gif" name="Image19" width="125" height="60" border="0" id="Image19" /></a><img src="right_english.gif" width="117" height="60" alt=""/></div>
     <div id="radiolive"><img src="left_radiolive.gif" width="124" height="80" alt=""/><a href="http://stream.megaquebec.net/socam.asx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image20','','radiolive_over.gif',1)"><img src="radiolive.gif" name="Image20" width="250" height="80" border="0" id="Image20" /></a><img src="right_radiolive.gif" width="117" height="80" alt=""/></div>
     <div id="autres"><img src="left_autres.gif" width="124" height="45" alt=""/><a href="http://www.socam.net/radiolive" target="_blank" onclick="window.open('http://www.socam.net/radiolive', 'SOCAMradiolive', ' height=450, width=600, top=10, left=10, toolbar=yes, menubar=no, location=no, resizable=yes, scrollbars=yes, status=yes'); return false; "><img src="autres.gif" width="250" height="45" border="0" alt="" /></a><img src="right_autres.gif" width="117" height="45" alt=""/></div>
     <div id="flash"><a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank" onclick="window.open('http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash', 'AdobeAdobeFlashPlayer', 'height=450, width=600, top=10, left=10, toolbar=yes, menubar=no, location=no, resizable=yes, scrollbars=yes, status=yes'); return false; "><img src="flash_player.gif" alt="" width="170" height="80" border="0" /><img src="flash_logo.gif" alt="" width="80" height="80" border="0" /></a></div>
	 <p></p>
     <div id="piedpage">Copyright © 2007 SOCAM</div>
     </div>
</div>
</body>
</html>


CSS

body , html {
margin: 0;
padding: 0;
text-align: center;
background-image: url(bk.gif);
min-width:500px;/* pour FF */
height:100%;
}

div#page {
    position: relative;
    margin: 0 auto;
	min-height: 100%;
}

		div#page #premier-element {
		margin-top: 0;
		}
		div#page #dernier-element {
		margin-bottom: 0;
		padding-bottom: 4em;
		}

#wrapper {
margin: 0 auto;
background-image: url(back2.png);
background-repeat: repeat-y;
text-align: left;
width: 770px;
}

#logo {
min-width:500px;
text-align:center;
margin-left: auto; 
margin-right: auto; 
}

#vagues {
min-width:500px;
text-align:center;
margin-left: auto; 
margin-right: auto; 
}

#francais {
min-width:500px;
text-align:center;
margin-left: auto; 
margin-right: auto; 
}

#radiolive {
min-width:500px;
text-align:center;
margin-left: auto; 
margin-right: auto; 
}

#autres {
min-width:500px;
text-align:center;
margin-left: auto; 
margin-right: auto; 
}

#flash {
min-width:500px;
text-align:center;
margin-left: auto; 
margin-right: auto; 
}

div#piedpage {
	position: absolute;
	bottom: 0; left: 0;
	width: 100%;
	text-align:center;
	font-family : "Trebuchet MS", Georgia, Times, serif;
	font-size : 80%;
	font-weight : bold;
	color : black;
}


Merci,

Alec[/i][/i][/i][/i][/i][/i]
Modifié par Alec Effeil (15 Aug 2007 - 05:20)
Ok bin j'ai réussi à obtenir ce que je voulais en explorant un tutoriel sur les bas de page que j'ai trouvé ici http://ryanfait.com/sticky-footer/sticker.txt . Le plus drôle c'est que je ne réussi pas à faire le bas de page mais mon problème d'arrière plan vertical quant-à lui est réglé.

Voir (pour ceux que ça intéressent): http://www.socam.net/background/

Voici le code

html
[code]<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SOCAM Société de communication Atikamekw-Montagnais</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="site.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onload="MM_preloadImages('francais_over.gif','english_over.gif','radiolive_over.gif')">

<div id="page">
	 <div id="wrapper"> 
     <div id="logo"><img src="left_banner_top.gif" width="124" height="250" alt=""/><img src="logo.jpg" width="250" height="250" alt=""/><img src="right_banner_top.gif" width="117" height="250" alt=""/></div>
     <div id="vagues"><img src="left_wave.gif" width="124" height="40" alt=""/><img src="vagues.gif" width="250" height="40" alt=""/><img src="right_wave.gif" width="117" height="40" alt=""/></div>
     <div id="francais"><img src="left_francais.gif" width="124" height="60" alt=""/><a href="http://www.socam.net/sitef/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image18','','francais_over.gif',1)"><img src="francais.gif" name="Image18" width="125" height="60" border="0" id="Image18" /></a><a href="http://www.socam.net/sitea/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image19','','english_over.gif',1)"><img src="english.gif" name="Image19" width="125" height="60" border="0" id="Image19" /></a><img src="right_english.gif" width="117" height="60" alt=""/></div>
     <div id="radiolive"><img src="left_radiolive.gif" width="124" height="80" alt=""/><a href="http://stream.megaquebec.net/socam.asx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image20','','radiolive_over.gif',1)"><img src="radiolive.gif" name="Image20" width="250" height="80" border="0" id="Image20" /></a><img src="right_radiolive.gif" width="117" height="80" alt=""/></div>
     <div id="autres"><img src="left_autres.gif" width="124" height="45" alt=""/><a href="http://www.socam.net/radiolive" target="_blank" onclick="window.open('http://www.socam.net/radiolive', 'SOCAMradiolive', ' height=450, width=600, top=10, left=10, toolbar=yes, menubar=no, location=no, resizable=yes, scrollbars=yes, status=yes'); return false; "><img src="autres.gif" width="250" height="45" border="0" alt="" /></a><img src="right_autres.gif" width="117" height="45" alt=""/></div>
     <div id="flash"><a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank" onclick="window.open('http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash', 'AdobeAdobeFlashPlayer', 'height=450, width=600, top=10, left=10, toolbar=yes, menubar=no, location=no, resizable=yes, scrollbars=yes, status=yes'); return false; "><img src="flash_player.gif" alt="" width="170" height="80" border="0" /><img src="flash_logo.gif" alt="" width="80" height="80" border="0" /></a></div>
	 <br />
	 <div id="piedpage">Copyright © 2007 SOCAM</div>
     </div>
</div>
</body>
</html>


Css:
[code]/* CSS Document */
* {
	margin: 0;
}
	
body , html {
margin: 0;
padding: 0;
text-align: center;
background-image: url(bk.gif);
min-width:500px;/* pour FF */
height:100%;
}

#wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -4em;
background-image: url(back2.png);
background-repeat: repeat-y;
text-align: left;
width: 770px;
}

#logo {
min-width:500px;
text-align:center;
margin-left: auto; 
margin-right: auto; 
}

#vagues {
min-width:500px;
text-align:center;
margin-left: auto; 
margin-right: auto; 
}

#francais {
min-width:500px;
text-align:center;
margin-left: auto; 
margin-right: auto; 
}

#radiolive {
min-width:500px;
text-align:center;
margin-left: auto; 
margin-right: auto; 
}

#autres {
min-width:500px;
text-align:center;
margin-left: auto; 
margin-right: auto; 
}

#flash {
min-width:500px;
text-align:center;
margin-left: auto; 
margin-right: auto; 
}

div#piedpage{
    height: 4em;
	text-align:center;
	font-family : "Trebuchet MS", Georgia, Times, serif;
	font-size : 80%;
	font-weight : bold;
	color : #E8DACA;
}


[/i][/i][/i][/i][/i][/i]
Modifié par Alec Effeil (16 Aug 2007 - 00:26)