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 :

Positionnement et responsive design


Sujet :

Responsive design en CSS

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Homme Profil pro
    Webmaster
    Inscrit en
    Novembre 2014
    Messages
    123
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 33
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Webmaster
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Novembre 2014
    Messages : 123
    Par défaut Positionnement et responsive design
    Bonjour à tous,

    Voici le site que je développe : http://www.elliotparis.fr

    Je vous expose ici mes 2 problèmes :

    - Dans un premier temps je ne comprends pas pourquoi sur mon iphone (320px) je peux dézoomer et alors je vois que le footer ne prend pas la totalité du width de la page.

    - Second souci : Lorsque j'inspecte l'élément sur Firefox pour vérifier le résultat du responsive, le résultat est comme je le désire. Or je suis allé sur ce site avec l'ordinateur d'un ami (13 pouces), et le résultat n'est absolument pas celui que j'ai eu moi, il se trouve que le footer était collé a l'iframe... Comment cela ce fait-il ?

    Si vous pouvez m'aider ca serait parfait ! Merci d'avance


    Je vous met le code :

    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
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
     
    <body>
     
    	<div id="wrap">
        <div class="bgfade" style="background-image:url('http://res1.windows.microsoft.com/resbox/en/windows/main/3245d978-ad9e-4cb2-be29-3332206fecce_5.jpg');"></div>
        <div class="bgfade" style="background-image:url('http://res2.windows.microsoft.com/resbox/en/windows/main/de1927c3-06a3-4ea1-b699-dbdaae3e5d32_5.jpg');"></div>
        <div class="bgfade" style="background-image:url('http://res1.windows.microsoft.com/resbox/en/windows/main/9ce62f36-1ed9-48dc-a417-ab6cab263d46_5.jpg');"></div>
      </div>
     
        <img class="logo" src="img/logo.png" alt="">
     
    	<iframe  src="https://www.youtube.com/embed/P-WdrMLLpPg" frameborder="0" allowfullscreen></iframe>
     
     
    	<div id="page">
            <h1>Ask a question ?</h1>
            <p>LMC provide all sorts of marketing services, that all what you need.</p>
            <form method="post" action="envoyer.php">
                <textarea name="question" placeholder="Question" rows="8" cols="50" AUTOCOMPLETE=OFF required></textarea>
                <input name="email" type="email" name="email" placeholder="Email" AUTOCOMPLETE=OFF required />
                <button type="submit">Send</button>
            </form>
    	</div>
     
    </body>
    <footer class="clear">
            <img class="logoMl" src="img/logo.png" alt="Logo"/>
            <p>
                Copyright © London Marketing Clinic   /   PARIS Elliot &amp; SASSUS Antonin  /   2015     
            </p>
        </footer>
    </html>

    Code CSS : 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
     
    *{
        margin:0;
        padding:0;
    }
     
    body, html
    {
      height: 100%;
      width: 100%;
    }
     
    .clear
    {
      clear: both;
    }
     
    #page 
    {
      width:35%;
      float: right;
      margin: 17% 7% 0 0;
      background:rgba(0,0,0,0.65);
      padding:1em;
      border-radius:1em;
      box-shadow:0 0 5px white;
      color:white;
    }
     
    #wrap
    {
      position:fixed;
      z-index:-1; 
      top:0; 
      left:0; 
      bottom:0; 
      right:0; 
      background:#000;
    }
     
    #wrap div.bgfade
    {
      position:absolute;
      top:0;
      left:0; 
      bottom:0; 
      right:0; 
      display:none;
      width:100%;
      height:100%;
      z-index:-1;
      background-size:cover;
    }
     
    .logo
    {
      position: absolute;
      margin: 3% 0 0 5%;
    }
     
     
    /****************************************/
    /**************** Vidéo *****************/
    /****************************************/
     
     
    iframe
    {
        margin-top: 15%;
        margin-left: 10%;
        float: left;
        width: 40%;
        height: 355px;
    }
     
    /****************************************/
    /************** Formulaire **************/
    /****************************************/
     
    #page h1, #page p
    {
      text-align: center;
      font-family: Verdana;
    }
     
    #page p
    {
      padding-top: 3%;
      font-size: 1vw;
    }
     
    textarea
    {
      margin-top: 5%;
      margin-left: 5%;
      width: 90%;
      border-radius:0.5em;
      font-family: Verdana;
    }
     
    input
    {
      width: 45%;
      margin: 2% 0 0 5%;
      height: 30px;
      border-radius:0.5em;
      margin-bottom: 5%;
      font-family: Verdana;
    }
     
    button
    {
      width: 35%;
      margin: 2% 0 0 9%;
      height: 30px;
      margin-bottom: 5%;
      border-radius:12px 0 12px 0;
      background: #d34836;
      border:none;
      color:#fff;
      font:bold 12px Verdana;
      padding:6px 0 6px 0;
    }
     
    /******************************************************/
    /*********************** Footer ***********************/
    /******************************************************/
     
    footer a
    {
      text-decoration: none;
      color: white;
    }
     
    footer p
    {
      margin-left: 30%;
      padding: 25px 0;
      font-size: 1vw;
    }
     
    footer
    {
      position: absolute;
      height: 70px;
      width:100%;
      background-color: black;    
      color: white;
      font-family: Verdana;
      bottom: 0px;
    }
     
    .logoMl
    {
      float: left;
      margin:10px 20px;
      height: 50px;
    }
     
    /******************************************************/
    /***************** Correction Firefox *****************/
    /******************************************************/
     
    @-moz-document url-prefix()
    {
        .logo
        {
          margin: 2% 0 0 -47%;
        }          
     
        #page 
        {
          margin: 14% 7% 0 0;
        }
    }
     
    /****************************************/
    /************** Responsive **************/
    /****************************************/
     
     
    @media screen  and (max-width: 1024px){
     
      iframe
      {
        height: 305px;
      }
     
      #page
      {
        margin: 16% 7% 0 0;
      }
    }
     
    @media screen  and (max-width: 900px){
     
      iframe
      {
        height: 270px;
      }
     
      #page
      {
        margin: 15% 7% 0 0;
      }
     
      h1
      {
        font-size: 2.5vw;
      }
     
      #page p
      {
        font-size: 1.2vw;
      }
    }
     
    @media screen  and (max-width: 768px){
     
      iframe
      {
          width: 45%;
          height: 260px;
          margin-left: 5%;
      }
     
      #page
      {
        margin: 15% 5% 0 0;
      }
     
      h1
      {
        font-size: 2.5vw;
      }
     
      #page p, footer p
      {
        font-size: 1.2vw;
      }
    }
     
    @media screen  and (max-width: 480px){
     
      body
      {
        background-image:url('http://res1.windows.microsoft.com/resbox/en/windows/main/3245d978-ad9e-4cb2-be29-3332206fecce_5.jpg');
      }
     
     
      #wrap
      {
        display: none;
      }
     
      .logo
      {
        margin: 3% 0 0 20%;
      }
     
      iframe
      {
        float: none;
        width: 80%;
        margin: 25% 0 0 10%;
      }
     
      #page
      {
        float: none;
        width: 74%;
        margin: 10% 0 0 10%;
      }
     
      h1
      {
        font-size: 4vw;
      }
     
      #page p, footer p
      {
        font-size: 2vw;
      }
     
      footer
      {
        position: relative;
        height: 100px;
        margin-top: 10%;
      }
    }
     
    @media screen  and (max-width: 360px){
     
      iframe
      {
        height: 215px;
      }
     
      .logo
      {
        margin: 3% 0 0 9%;
      }
     
      #page
      {
        width: 71%;
      }
     
      h1
      {
        font-size: 5vw;
      }
     
      #page p, footer p
      {
        font-size: 3vw;
      }
     
      footer
      {
        height: 120px;
      }
    }
     
    @media screen  and (max-width: 320px){
     
      iframe
      {
        height: 192px;
      }
     
      .logo
      {
        margin: 3% 0 0 4%;
      }
     
      #page
      {
        width: 69%;
      }
    }

  2. #2
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 211
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 211
    Par défaut
    Bonjour,
    tu as un problème de cohérence de l'ensemble

    d'une part tu as
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    body, html {
        height: 100%;
        width: 100%;
    }
    donc en mode "width:320" la largeur fera 320px au plus

    d'autre part tu as
    IMG logo = 329px × 55px  // sans compter les margins
    ce qui en mode "width:320" déclenche l'apparition d'une scrollbar, ce qui entraine que html/body ne font plus que 320- scrollBar.width et comme tu as
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    footer {
        width: 100%;
    }
    enfant de BODY celui ci ne fait que la largeur du BODY donc moins de 320px.

  3. #3
    Membre confirmé
    Homme Profil pro
    Webmaster
    Inscrit en
    Novembre 2014
    Messages
    123
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 33
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Webmaster
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Novembre 2014
    Messages : 123
    Par défaut
    Donc il suffit de redimensionner le logo du footer si j'ai bien compris ?

  4. #4
    Invité
    Invité(e)
    Par défaut
    Bonjour,
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    .logoMl {
        float: left;
        margin: 10px 2% 0;
        max-height: 50px;
        max-width: 96%;
    }

  5. #5
    Membre confirmé
    Homme Profil pro
    Webmaster
    Inscrit en
    Novembre 2014
    Messages
    123
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 33
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Webmaster
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Novembre 2014
    Messages : 123
    Par défaut
    Merci beaucoup un souci de réglé !

  6. #6
    Membre confirmé
    Homme Profil pro
    Webmaster
    Inscrit en
    Novembre 2014
    Messages
    123
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 33
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Webmaster
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Novembre 2014
    Messages : 123
    Par défaut
    J'ai réglé le second souci aussi !
    Merci a vous

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

Discussions similaires

  1. Positionnement divs imbriqués et responsive design
    Par youness78 dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 08/08/2014, 17h23
  2. [CSS 3] Responsive design ne marche pas sur tablette
    Par DevilYann dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 06/02/2013, 15h34
  3. [Drupal] Problème affichage Responsive Design template Fusion Fusion Accelerator
    Par mealtone dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 0
    Dernier message: 02/12/2012, 23h47
  4. css responsive design = spécialité ?
    Par guitz dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 05/11/2012, 14h16

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