IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Mise en page CSS Discussion :

Mise en page menu vertical


Sujet :

CSS

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé Avatar de frog43
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    342
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 342
    Par défaut Mise en page menu vertical
    Bonjour,
    sur ce site, je n'arrive pas à faire que le fond du menu (couleur marron) aille jusqu'en bas de page ...

    J'aurais donc besoin d'aide pour réussir à le faire. Voici le CSS :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
     
    @charset "UTF-8";
    /* CSS Document */
     
     
    body{
    	margin:0;
    	padding:0;
    	background-color:#f6e29a;
    	font-family:"Lucida Grande CY", Arial, sans-serif;
    	font-size:14px;
    }
     
    #conteneur{
    	margin-left : auto;
    	margin-right : auto;
    	border : 0px;
    	z-index:1;
    	width: 1000px;
    	color:#594240;
    	background-color:#ecb802;
    }
     
    #contenu{
    	position:absolute;
    	top:0px;
    	width:1000px;
    	min-height:100%;
    	background-color:#ecb802;
    	z-index: 2;
    }
     
    #ban{
    	width:1000px;
    	height:156px;
    	background-image:url(img/ban.jpg);
    	background-repeat:no-repeat;
    	z-index:4;
    }
     
    #menu{
    	background-color:#6e524e;
    	width:150px;
    	float:left;	
    	min-height:100%;
    }
     
    .signature{
    	color:#6e524e;
    	font-size:11px;
    	padding-bottom:5px;
    }
     
    a:hover{
    	text-decoration:none;
    	color:#FFFFFF;
    }
     
    a{
    	text-decoration:none;
    	color:#6e524e;
    }

  2. #2
    Membre confirmé
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    69
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juin 2006
    Messages : 69
    Par défaut
    Je crois que pour que ton min-height en 100% fonctionne il faut que ton body et tous les conteneurs aient une hauteur définie en %. Cela vaut aussi pour height.

    De plus il faut aussi spécifier height pour que min-height soit pris en compte ?

  3. #3
    Membre éclairé Avatar de frog43
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    342
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 342
    Par défaut
    Je comprends pas tout là ...
    Dur de définir toutes les hauteur en % ... La aussi je veux bien un peu d'aide ...

  4. #4
    Membre confirmé
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    69
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juin 2006
    Messages : 69
    Par défaut
    Tu dois avoir ton html en {height:100%} et ton body en { height:100%}.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
    html {
    height:100%
    }
    body {
    height:100%;
    }
    Comme je n' ai pas ton code html je ne peux pas tester.

    Essaye de voir si ça marche sur IE et Firefox.

  5. #5
    Membre éclairé Avatar de frog43
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    342
    Détails du profil
    Informations personnelles :
    Âge : 39
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 342
    Par défaut
    Merci pour ton aide, mais sa ne marche toujours pas ...
    Voici le HTML :
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>J.F. Coste, artisan fabriquant</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    </head>
     
    <body>
    	<div id="conteneur">
        	   <div id="contenu">
        	      <div id="ban"></div>
                  <div id="menu"></div>
                  <p align="center"><strong>&gt;&gt;</strong> Site en   <strong>CONSTRUCTION &lt;&lt;</strong></p>
            <p class="signature" align="center">Conception &amp; réalisation <a href="http://www.designcreation.fr" target="_blank">Design'Création</a></p>
            </div>
        </div>
    </body>
    </html>

    et le nouveau CSS :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
     
    @charset "UTF-8";
    /* CSS Document */
     
    html {
    	height:100%;
    }
     
    body{
    	margin:0;
    	padding:0;
    	background-color:#f6e29a;
    	font-family:"Lucida Grande CY", Arial, sans-serif;
    	font-size:14px;
    	height:100%;
    }
     
    #conteneur{
    	margin-left : auto;
    	margin-right : auto;
    	border : 0px;
    	z-index:1;
    	width: 1000px;
    	height:100%;
    	color:#594240;
    	background-color:#ecb802;
    }
     
    #contenu{
    	position:absolute;
    	top:0px;
    	width:1000px;
    	min-height:100%;
    	background-color:#ecb802;
    	z-index: 2;
    }
     
    #ban{
    	width:1000px;
    	height:156px;
    	background-image:url(img/ban.jpg);
    	background-repeat:no-repeat;
    	z-index:4;
    }
     
    #menu{
    	background-color:#6e524e;
    	width:150px;
    	float:left;	
    	min-height:100%;
    }
     
    .signature{
    	color:#6e524e;
    	font-size:11px;
    	padding-bottom:5px;
    }
     
    a:hover{
    	text-decoration:none;
    	color:#FFFFFF;
    }
     
    a{
    	text-decoration:none;
    	color:#6e524e;
    }

  6. #6
    Membre confirmé
    Profil pro
    Inscrit en
    Juin 2006
    Messages
    69
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juin 2006
    Messages : 69
    Par défaut
    Je viens de faire des tests et le menu se présente bien en 100%

    à la seule condition que tu mettes ton div #contenu en height:100%.

    C' est le parent direct de #menu.

    Ca marche sous IE et Firefox.

    Pour bien faire il faut tout de même préciser html,body {
    height:100% }.


    Donc en reprenant ton code cela donne:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
     
     
    html {
    	height:100%;
    }
     
    body{
    	margin:0;
    	padding:0;
    	background-color:#f6e29a;
    	font-family:"Lucida Grande CY", Arial, sans-serif;
    	font-size:14px;
    	height:100%;
    }
     
    #conteneur{
    	margin-left : auto;
    	margin-right : auto;
    	border : 0px;
    	z-index:1;
    	width: 1000px;
    	color:#594240;
    	background-color:#ecb802;
    }
     
    #contenu{
    	position:absolute;
    	top:0px;
    	width:1000px;
            height:100%;
    	background-color:#ecb802;
    	z-index: 2;
    }
     
    #ban{
    	width:1000px;
    	height:156px;
    	background-image:url(img/ban.jpg);
    	background-repeat:no-repeat;
    	z-index:4;
    }
     
    #menu{
    	background-color:#6e524e;
    	width:150px;
    	float:left;	
    	min-height:100%;
    }
     
    .signature{
    	color:#6e524e;
    	font-size:11px;
    	padding-bottom:5px;
    }
     
    a:hover{
    	text-decoration:none;
    	color:#FFFFFF;
    }
     
    a{
    	text-decoration:none;
    	color:#6e524e;
    }

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Mise en page menu
    Par rico83600 dans le forum Mise en page CSS
    Réponses: 5
    Dernier message: 02/03/2015, 19h12
  2. [HTML 5] Mise en Page menu déroulant
    Par benirho dans le forum Balisage (X)HTML et validation W3C
    Réponses: 1
    Dernier message: 23/10/2014, 13h16
  3. états / mise en page texte vertical
    Par Pau dans le forum IHM
    Réponses: 2
    Dernier message: 30/06/2010, 18h06
  4. [Menu deroulant] Mise en page.
    Par Arbisis dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 16/05/2007, 12h03
  5. mise en page, superposition du menu et du bas de page
    Par takinelinfo dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 05/11/2006, 21h44

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo