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 :

Page trop haute => vide en bas


Sujet :

CSS

  1. #1
    Membre à l'essai
    Inscrit en
    Mars 2012
    Messages
    5
    Détails du profil
    Informations forums :
    Inscription : Mars 2012
    Messages : 5
    Points : 13
    Points
    13
    Par défaut Page trop haute => vide en bas
    Bonjour,

    je débute en CSS et je me confronte à un problème auquel je n'arrive pas à trouver la solution.

    Pour résumer, pour disposer mes différents blocs, j'utilise le positionnement relatif.
    J'ai réussi à mener mes différents éléments là où je le souhaitais mais maintenant, je remarque que ma page est trop haute, dans le sens où avant le fin de page, il y a une grande zone vide
    Je pense que c'est du au fait que j'utilise le positionnement relatif.

    J'ai peut-être manqué quelques choses dans ma structure en HTML (ou j'ai juste créé un bloc <div> pour chaque élément de ma page).
    Peut-être que j'ai pas du tout fait comme il faut ...

    Si vous avez une idée d'où le problème vient ou de comment je pourrais y remédier, je vous remercie d'avance de votre aide.
    Voici une image pour vous donner un aperçu suivi du code.
    Desolé du bordel ^_^"
    http://www.imagup.com/data/1147056204.html
    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
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
     
    html {
    height: 101%;;
    }
    body {
    color : #333;
    background : url(../images/background.png);
    font-family: Arial, sans-serif;
    font-size : 12px;
    padding : 0;
    margin : 0;
    }
    img {
    border : none;
    }
    a {
    color : #9e9e9e;
    }
    a:hover {
    text-decoration : none;
    }
    a:focus {
    outline: none;
    }
    .clr {
    clear : both;
    }
     
    * {
    margin : 0;
    padding : 0;
    }
     
    #overwrapper {
    width: 1000px;
    height: auto;
    margin: 0 auto;
    }
     
    #wrapper {
    width: 940px;
    height: auto;
    margin: 0 auto;
    }
     
    #logo {
    margin-top: 20px;
    height: 110px;
    width: 124px;
    float: left;
    background: url(../images/logo.png) top left no-repeat;
    }
     
    #english{
    width: 42px;
    height: 28px;
    background: url(../images/english.png) repeat;
    position: relative;
      left: 851px;
      top: 40px;
    }
     
    #vietnamiese{
    width: 42px;
    height: 28px;
    background: url(../images/vietnam.png) repeat;
    position: relative;
      left: 893px;
      top: 12px;
    }
     
     
    #middlemenu {
    width: 940px;
    height: 440px;
    display: inline-block;
    }
     
    #slideshow {
    margin-top: 20px;
    height: auto;
    width: 580px;
    clear: both;
    position: relative;
        left: 0px;
        top: 0px;
    display: inline-block;
    }
     
    #sportmenu{
    margin-top: 20px;
    height: 405px;
    width: 354px;
    background-color: white;
    vertical-align: top;
    display: inline-block;
    }
     
    #choose{
    margin:auto;
    height: 33px;
    width: 299px;
    background: url(../images/choosemenu.png) no-repeat;
    font-size:16px;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height :25px;
    }
     
    markssa{
    font-size: small;
     
    }
    markk{
    font-size:20px;
    }
     
     
    #Football{
    height: 100px;
    width: 160px;
    background: url(../images/sportmenu.png) repeat;
    position: relative;
        left: 10px;
        top: 20px;
    font-size:16px;
    font-weight: bold;
    color: #187805;
    text-align: center;
    line-height :20px;
    }
     
    #Tennis{
    height: 100px;
    width: 160px;
    background: url(../images/sportmenu.png) repeat;
    position: relative;
      left: 10px;
      top: 35px;
    font-size:16px;
    font-weight: bold;
    color: #187805;
    text-align: center;
    line-height :20px; 
    }
     
    #Basketball{
    height: 100px;
    width: 160px;
    background: url(../images/sportmenu.png) repeat;
    position: relative;
      left: 10px;
      top: 50px;
    font-size:16px;
    font-weight: bold;
    color: #187805;
    text-align: center;
    line-height :20px;
    }
     
    #chooseright{
    height: auto;
    width: auto;
    position: relative;
        left: 185px;
        top: -300px;
    }
     
    #Chess{
    height: 100px;
    width: 160px;
    background: url(../images/sportmenu.png) repeat;
    position: relative;
        top: 20px;
    font-size:16px;
    font-weight: bold;
    color: #187805;
    text-align: center;
    line-height :20px;
    }
     
    #Swimming{
    height: 100px;
    width: 160px;
    background: url(../images/sportmenu.png) repeat;
    position: relative;
        top: 35px;
    font-size:16px;
    font-weight: bold;
    color: #187805;
    text-align: center;
    line-height :20px;
    }
     
    #Skillsfactory{
    height: 100px;
    width: 160px;
    background: url(../images/sportmenu.png) repeat;
    position: relative;
        top: 50px;
    font-size:16px;
    font-weight: bold;
    color: #187805;
    text-align: center;
    line-height :20px;
    }
     
    #middlebar{
    height: 400px;
    width: 940px;
    display: inline-block;
    }
     
    #aboutus{
    height: 70px;
    width: 185px;
    background: url(../images/aboutus.png) repeat;
    position: relative;
        left: 0px;
    font-size:20px;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height :115px;
    }
     
    #coaching{
    height: 70px;
    width: 185px;
    background: url(../images/coaching.png) repeat;
      position: relative;
        left: 188px;
        top: -70px;
    font-size:20px;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height :115px;
    }
     
    #summercamp{
    height: 70px;
    width: 185px;
    background: url(../images/summercamp.png) repeat;
        position: relative;
        left: 376px;
        top: -140px;
    font-size:20px;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height :115px;
    }
     
    #locations{
    height: 70px;
    width: 185px;
    background: url(../images/location.png) repeat;
        position: relative;
        left: 564px;
        top: -210px;
    font-size:20px;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height :115px;
    }
     
    #contactus{
    height: 70px;
    width: 185px;
    background: url(../images/contactus.png) repeat;
        position: relative;
        left: 752px;
        top: -280px;
    font-size:20px;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height :115px;
    }
     
    #introduction{
    width: auto;
    height: auto;
    position: relative;
    top: -300px;
    }
     
    #titletext{
    font-size:30px;
    font-weight: bold;
    color: #187805;
    }
    #text{
    font-size:17px;
    height: 100px;
    width: 940px;
    color: black;
    }
     
    #titlenews{
    font-size:30px;
    font-weight: bold;
    color: #187805;
    height: 40px;
    width: 550px;
    position: relative;
    top: -250px;
    }
     
    #latestnews{
    height: 450px;
    width: 550px;
    position: relative;
      top:-250px;
    }
     
    #titlesponsor{
    height: 40px;
    width: 380px;
    font-size:30px;
    font-weight: bold;
    color: #187805;
    position: relative;
    top: -740px;
    left: 580px;
    }
     
    #sponsorbanner{
    height: auto;
    width: auto;
    position: relative;
    top: -747px;
    left: 585px;
    }
     
    #partner{
    height: auto;
    width: auto;
    position: relative;
    top: -745px;
    left: 585px;
    padding : 0;
    }
     
    #titlepartner{
    font-size:30px;
    font-weight: bold;
    color: #187805;
    }
     
    #fbmark{
    background: url(../images/fbicon.png);
    width: 40px;
    height: 37px;
    float: right;
    position: relative;
    top:200px;
    z-index: 3;
    }
     
     
    #footer {
    padding: 10px;
    text-align: center;
    }
    Merci

  2. #2
    Inactif  

    Homme Profil pro
    développeur Vala
    Inscrit en
    Février 2011
    Messages
    478
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Cher (Centre)

    Informations professionnelles :
    Activité : développeur Vala
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Février 2011
    Messages : 478
    Points : 3 700
    Points
    3 700
    Par défaut
    Bonjour
    Si tu ne veux pas de vide en bas de page, il faut que la hauteur totale de tes div soit de 100% ou presque. Modifie les valeurs des propriétés height en css, en pourcentage ou valeurs fixes. Ce n'est qu'un exemple, tu modifieras comme tu le souhaites
    (marquer un post résolu si vous êtes satisfait de la réponse )
    ma page launchpad https://launchpad.net/~inizan-yannick
    ma page github : https://github.com/inizan-yannick

  3. #3
    Membre à l'essai
    Inscrit en
    Mars 2012
    Messages
    5
    Détails du profil
    Informations forums :
    Inscription : Mars 2012
    Messages : 5
    Points : 13
    Points
    13
    Par défaut
    Merci de ta réponse,
    Je vais tenter d'appliquer ce que tu m'as dit. ^^

  4. #4
    Membre à l'essai
    Inscrit en
    Mars 2012
    Messages
    5
    Détails du profil
    Informations forums :
    Inscription : Mars 2012
    Messages : 5
    Points : 13
    Points
    13
    Par défaut
    Pour être sûr que j'ai bien tout compris, je résume:
    Il faut que la somme totale des hauteurs de mes div soient égales à la hauteur choisie dans le body.
    Ou bien si en %, il faut que la somme totale soit de 100%?
    Par exemple, si j'ai 3 divisions sur ma page, je ferais height: 33% pour chacune?

    Vais-je rencontrer un problème du au fait que j'aligne des div à l'aide du positionnement relatif tandis qu'ils sont l'un en dessous de l'autre dans mon code html?

    Merci encore de ton aide,

  5. #5
    Inactif  

    Homme Profil pro
    développeur Vala
    Inscrit en
    Février 2011
    Messages
    478
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 37
    Localisation : France, Cher (Centre)

    Informations professionnelles :
    Activité : développeur Vala
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Février 2011
    Messages : 478
    Points : 3 700
    Points
    3 700
    Par défaut
    Citation Envoyé par Mexures Voir le message
    Pour être sûr que j'ai bien tout compris, je résume:
    Il faut que la somme totale des hauteurs de mes div soient égales à la hauteur choisie dans le body.
    Ou bien si en %, il faut que la somme totale soit de 100%?
    Par exemple, si j'ai 3 divisions sur ma page, je ferais height: 33% pour chacune?

    Vais-je rencontrer un problème du au fait que j'aligne des div à l'aide du positionnement relatif tandis qu'ils sont l'un en dessous de l'autre dans mon code html?

    Merci encore de ton aide,
    si elles sont correctement placées l'une en dessous de l'autre, il ne devrait pas y avoir de problème
    (marquer un post résolu si vous êtes satisfait de la réponse )
    ma page launchpad https://launchpad.net/~inizan-yannick
    ma page github : https://github.com/inizan-yannick

  6. #6
    Membre à l'essai
    Inscrit en
    Mars 2012
    Messages
    5
    Détails du profil
    Informations forums :
    Inscription : Mars 2012
    Messages : 5
    Points : 13
    Points
    13
    Par défaut
    Ok, je te tiens au courant.
    Désolé si mon temps de réponse est un peu longue.

  7. #7
    Membre à l'essai
    Inscrit en
    Mars 2012
    Messages
    5
    Détails du profil
    Informations forums :
    Inscription : Mars 2012
    Messages : 5
    Points : 13
    Points
    13
    Par défaut
    Bonjour,
    désolé pour la réponse tardive.
    Après avoir refait au propre le CSS, la page s'affiche désormais sans vide.
    Je te remercie de ton aide.

    J'ai une dernière question.
    Avant de refaire le CSS, j'avais utilisé overflow, afin de couper net la page où je le souhaitais. Comme ça me paraissait un peu sale, j'ai préféré faire ce que tu m'as dit. Mais l'overflow m'aurait-il apporter des problèmes par la suite?

Discussions similaires

  1. [WD-2007] Tableaux continuent dans le vide en bas de page
    Par Laaris dans le forum Word
    Réponses: 6
    Dernier message: 03/04/2013, 13h29
  2. Impression tableau trop grand, cellules coupées en bas de page
    Par scubb dans le forum Mise en page CSS
    Réponses: 4
    Dernier message: 18/05/2011, 09h22
  3. Menu en bas de page trop bas
    Par gnova dans le forum Mise en page CSS
    Réponses: 7
    Dernier message: 23/02/2011, 21h54
  4. notes de bas de page trop hautes
    Par pives dans le forum Word
    Réponses: 3
    Dernier message: 07/08/2008, 15h32
  5. [XHTML] Eviter un haut de page avec un lien vide
    Par qi9859 dans le forum Balisage (X)HTML et validation W3C
    Réponses: 4
    Dernier message: 21/05/2007, 08h42

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