<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <style type="text/css"> body { margin : 10px; padding : 0; font-size : 13px; font-family: Verdana; } div { height : 350px; } div#D_GAUCHE { float : left; width : 150px; border : 1px solid #8080f0; } div#D_DROITE { float : right; width : 150px; border : 1px solid #f08080; } div#D_CENTRE { margin-left : 160px; margin-right : 160px; border : 1px solid #80f080; } </style> </head> Gauche Droite Centre </html>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question<!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" xml:lang="fr" lang="fr"> <head> <title></title> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> <script src="jquery-1.3.2.min.js" type="text/javascript"></script> <style> body, html { height:100%; margin:0; width:100%; } #centm { width:100%; height:50px; float:left;background-color:#cecece;} #menu { width:1000px; background-color:purple; height:50px; margin: 0 auto;}; #all { width:1000px; height:100%; margin: 0 auto; background-color:#bbbbbb; float:left;} #gauche { height:100%; background-color:Aqua; float:left;} #droite { height:100%; background-color:green; float:right;} #centre { width:100%; background-color:blue; margin:0;} #ban { height:120px; background-color:red; top:50px;} #content { background-color:yellow; padding:10px; top:170px; } </style> <script> function Browser () { //Détection plate-forme if (navigator.appVersion.indexOf('Win') != -1) this.win=true; if (navigator.appVersion.indexOf('Mac') != -1) this.mac=true; if (navigator.appVersion.indexOf('Linux') != -1) this.linux=true; if(this.win) this.plateForme = 'Windows'; if(this.mac) this.plateForme = 'Macintosh'; if(this.linux) this.plateForme = 'Linux'; //Détection du navigateur if(navigator.userAgent.indexOf('Opera')!=-1) this.opera=true; if(navigator.userAgent.indexOf('Konqueror')!=-1) this.konqueror=true; if(navigator.userAgent.indexOf('Safari')!=-1) this.safari=true; if(navigator.userAgent.indexOf('Firefox')!=-1) this.firefox=true; if(navigator.userAgent.indexOf('Netscape')!=-1) this.netscape=true; if(navigator.userAgent.indexOf('MSIE 6')!=-1) this.ie6=true; if(navigator.userAgent.indexOf('MSIE 7')!=-1) this.ie7=true; if(navigator.userAgent.indexOf('MSIE 8')!=-1) this.ie8=true; if(this.opera) this.nav="Opera"; if(this.konqueror) this.nav="Konqueror"; if(this.safari) this.nav="Safari"; if(this.firefox) this.nav="Firefox"; if(this.netscape) this.nav="Netscape"; if(this.ie6) this.nav="Internet Explorer 6"; if(this.ie7 || this.ie8) this.nav="Internet Explorer > 6"; if(!this.nav) this.nav= "Inconnu"; if(this.ie6 || this.ie7 || this.ie8) this.idnav="ie"; if(this.idnav=='ie') { this.winH = document.documentElement.clientHeight; this.winW = document.documentElement.clientWidth; } else { this.winH = window.innerHeight; this.winW = window.innerWidth; } } $(document).ready( function() { or=(document.getElementById('content').offsetHeight); tot=document.getElementById('gauche').offsetHeight; m=$("#menu").css('height'); m=parseInt(m.substr(0,m.indexOf('px'))); b=$("#ban").css('height'); b=parseInt(b.substr(0,b.indexOf('px'))); C=tot-(b+m); if(C<or) C=(or+20); $("#gauche").css('height', (C+b)+'px'); $("#droite").css('height', (C+b)+'px'); $("#content").css('height', (C+m-20)+'px'); var browser = new Browser; winH = browser.winH; winW=((browser.winW-1000)/2); $("#droite").css('width', winW+'px'); $("#gauche").css('width', winW+'px'); $("#content").css('width', (winW+1000)+'px'); $("#ban").css('width', (winW+1000)+'px'); }); </script> </head> Menu Gauche Droite BAN vvvvdddddddddddddddddddddddddddddddddddddvvvvddddvvvvdddddddddddddddddddddddddddd </html>