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 :

Un body en overflow:hidden avec un contenu en overflow:auto (ou l'inverse)


Sujet :

CSS

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Homme Profil pro
    Webdesigner
    Inscrit en
    Août 2014
    Messages
    445
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Webdesigner
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Août 2014
    Messages : 445
    Par défaut Un body en overflow:hidden avec un contenu en overflow:auto (ou l'inverse)
    Bonjour à tous,
    J'ai une div fullscreen avec un z-index qui permet de masquer les autres div.
    Le "fullsscreen" devient hidden lors d'un clic sur la barre des menus.
    Y'a t'il moyen de donner un overflow:hidden uniquement à la div "fullscreen" ?
    De mon côté, j'ai eu beau chercher niveau CSS, ma page reste toujours scrollable... ou pas du tout
    Beaucoup de recherches sur internet, et pas de réponse à mon problème excepté ce vieux 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
    33
    34
    	<body scroll="no" style="margin:0">
    		<table height="100%" width="100%" cellpadding="0" cellspacing="0">
    			<tr>
    				<td height="40" style="background-color:silver">
    					This is the non-scrolling region<br>
    					This part won't scroll
    				</td>
    			</tr>
    			<tr>
    				<td>
    					<div style="height:100%;width:100%;overflow:auto;">
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    						This is the scrolling region<br>
    					</div>
    				</td>
    			</tr>
    		</table>
    	</body>
    Existe-t'il un moyen plus "moderne" pour réaliser ce que je désire faire ?
    Bonne fin de week-end,
    dh

  2. #2
    Modérateur

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

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 209
    Par défaut
    Bonjour,
    affiche ta DIV en position:fixed, le scroll de ta page ne sera plus un problème.

  3. #3
    Membre éclairé
    Homme Profil pro
    Webdesigner
    Inscrit en
    Août 2014
    Messages
    445
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Webdesigner
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Août 2014
    Messages : 445
    Par défaut
    Bouhhouuuwouuuhooouwoouuubhouuu.
    Toujours ce scroll
    Scroll terrible dans mon cas, mais THX NoSmoking
    Bonne soirée,
    dh

  4. #4
    Membre éclairé
    Homme Profil pro
    Webdesigner
    Inscrit en
    Août 2014
    Messages
    445
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Webdesigner
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Août 2014
    Messages : 445
    Par défaut
    Pardon NoSmoking, la div est fixed, c'est simplement l'overflow que j'aimerais supprimer... uniquement sur cette div fullscreen.
    Quand cette div se masque (voir nos échanges précédents et ton code), on retrouve l'overflow pour la suite des div (masquée par le fullscreen).
    Est-ce possible ?
    Merci et bonne soirée,
    dh

  5. #5
    Invité
    Invité(e)
    Par défaut
    Bonjour,

    Il serait temps de montrer ton code, non ?

    (= exemple de code CSS + HTML qu'on peut tester)

  6. #6
    Membre éclairé
    Homme Profil pro
    Webdesigner
    Inscrit en
    Août 2014
    Messages
    445
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Webdesigner
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Août 2014
    Messages : 445
    Par défaut
    Bonjour jreaux62
    Voici le html (qui doit te faire penser à qq chose
    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
    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
    <!-- Menu -->
    <header class="main_header">
      <div class="menu">
        <div class="content"> <a class="logo" href="#">GD</a>
          <div class="mobile-toggle"> <span></span> <span></span> <span></span> </div>
          <nav id="mymenu">
            <ul>
              <li><a href=".sec01" data-link="1">Section 01</a></li>
              <li><a href=".sec02" data-link="2">Section 02</a></li>
              <li><a href=".sec03" data-link="3">Section 03</a></li>
              <li><a href=".sec04" data-link="4">Section 04</a></li>
            </ul>
          </nav>
        </div>
      </div>
     
    </header>
    <!-- Fulscreen que je souhaite en overflow hidden -->
    <div id="bgfadewrap">
      <div id="bgfade1">
      <h1>Test</h1>
        <div id="polina">
    <h1>Polina</h1>
    <p>Encore une page test</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur porta dictum turpis, eu mollis justo gravida ac. Proin non eros blandit, rutrum est a, cursus quam. Nam turpis eros sollicitudin lacus, at convallis mauris magna non justo. Etiam et suscipit elit. Morbi eu ornare nulla, sit amet ornare est. Sed vehicula ipsum a mattis dapibus. Etiam volutpat vel enim at auctor.</p>
    <img src="../oseraie/tumblr_nwvjv.jpg" width="515" height="810"  alt=""/>
    </div></div>
      <div id="bgfade2">
        <div>
          <h1>Life is Great</h1>
          <p>Aenean pharetraamtuntesque. Vestibulum et metus lectus. Nunc consectetur, ipsum in viverra eleifend, erat erat ultricies felis, at ultricies mi massa eu ligula. Suspendisse in justo dapibus metus sollicitudin ultrices id sed nisl.</p>
        </div>
      </div>
      <div id="bgfade3">
        <div>
          <h1>Enjoy & Smile</h1>
          <p>Ut enim quisque sibi plurimum confidit et ut quisque maxime virtute et sapientia sic munitus est, ut nullo egeat suaque omnia in se ipso posita iudicet, ita in amicitiis expetendis colendisque maxime excellit. Quid enim? Africanus indigens mei? Minime hercule! ac ne ego quidem illius; sed ego admiratione quadam virtutis eius, ille vicissim opinione fortasse non nulla, quam de meis moribus habebat, me dilexit; auxit benevolentiam consuetudo. Sed quamquam utilitates multae et magnae consecutae sunt, non sunt tamen ab earum spe causae diligendi profectae.</p>
        </div>
    </div>
    </div>
    <!-- Div scrollables -->
    <div id="section01" class="sec01">
    <div class="carousel fade-carousel slide" data-ride="carousel" data-interval="4000" id="bs-carousel">
      <div class="overlay"></div>
     
      <ol class="carousel-indicators">
        <li data-target="#bs-carousel" data-slide-to="0" class="active"></li>
        <li data-target="#bs-carousel" data-slide-to="1"></li>
        <li data-target="#bs-carousel" data-slide-to="2"></li>
      </ol>
     
      <div class="carousel-inner">
        <div class="item slides active">
          <div class="slide-1"></div>
          <div class="hero">
            <hgroup>
                <h1>We are creative</h1>        
                <h3>Get start your next awesome project</h3>
            </hgroup>
            <button class="btn btn-hero btn-lg" role="button">See all features</button>
          </div>
        </div>
        <div class="item slides">
          <div class="slide-2"></div>
          <div class="hero">        
            <hgroup>
                <h1>We are smart</h1>        
                <h3>Get start your next awesome project</h3>
            </hgroup>       
            <button class="btn btn-hero btn-lg" role="button">See all features</button>
          </div>
        </div>
        <div class="item slides">
          <div class="slide-3"></div>
          <div class="hero">        
            <hgroup>
                <h1>We are amazing</h1>        
                <h3>Get start your next awesome project</h3>
            </hgroup>
            <button class="btn btn-hero btn-lg" role="button">See all features</button>
          </div>
        </div>
      </div> 
    </div>
    et les 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
    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
    * { box-sizing: border-box; }
     
    body, html {
    	font-weight: 300;
    	-webkit-font-smoothing: antialiased;
    	padding: 0;
    	margin: 0;
    	width: 100%;
    	height: 100%;
    }
    #polina {
    	font-family: Agenda-Light, Agenda Light, Agenda, Arial Narrow, sans-serif;
    	font-weight: 100;
    	color: white;
    	padding: 2rem;
    	width: 33%;
    	margin: 2rem;
    	float: right;
    	font-size: 1.2rem;
    	background-color: rgba(102,102,0,0.3);
    }
    #polina h1 {
      font-size: 3rem;
      text-transform: uppercase;
      margin-top: 0;
      letter-spacing: .3rem;
    }
    /* --- Base of examples --- */
     
    #bgfadewrap { text-align:center; }
    #bgfadewrap, #bgfadewrap > div {
    	z-index:99999;
    	top:0; left:0; bottom:0; right:0; 
    	width:100%; height:100%; overflow:hidden; position:absolute; 
    }
    #bgfadewrap {
    	position:fixed;
    	background:#000;
    }
    #bgfadewrap > div {
    	position:absolute;
    	background-size:cover;
    	display:none;
    }
    #bgfade1 {
    	background-image: url(img/IMG_0945.JPG);
    	padding-left: 10px;
    	padding-right: 10px;
    	width: 33%;
    }
     
    #bgfade2 {
      background-image:url(imgs/B.jpg);
    }
    #bgfade3 {
      background-image:url(imgs/IMG_6129b.jpg);
    }
     
    /* bloc de texte qui SLIDE */
    #bgfadewrap > div > div {
      position:absolute; 
      padding:0; top:0;
      width:50%; 
    }
    #bgfadewrap > div > div h1 { 
      text-align:center; font-size:400%; color:rgba(0,0,0,0.5); 
      margin:2% 20%;
    }
    #bgfadewrap > div > div p { 
      text-align:center; font-size:140%; color:rgba(0,0,0,0.8); 
      margin:0 20%;
    }
     
    nav ul li {
    	padding: 7px 0 20px;
    	float: left;
    	margin: 0 8px;
    }
     
    nav ul a {
    	color: #888888;
    	font-size: 12px;
    }
     
    a { text-decoration: none; }
     
    h1 {
    	font-size: 30px;
    	line-height: 1.8;
    	text-transform: uppercase;
    	font-family: "Oswald", sans-serif;
    	color: #000000;
    }
     
    p {
      margin-bottom: 20px;
      font-size: 17px;
      line-height: 2;
    }
     
    .menu {
    	width: 100%;
    	position: relative;
    	margin-bottom: 0;
    	/* [disabled]margin-left: auto; */
    	margin-right: 0px;
    	float: right;
    	padding-bottom: 0;
    	padding-top: 0;
    }
     
    .content {
    	max-width: 100%;
    	width: 100%;
    	height: auto;
    	z-index: 1;
    	margin-bottom: 0;
    	margin-left: auto;
    	margin-right: auto;
    	padding-bottom: 50px;
    	padding-left: 2%;
    	padding-right: 2%;
    	/* [disabled]padding-top: 70px; */
    	color: #000000;
    }
     
    .main_header .menu .content { padding: 0; }
     
    #section01 {
    	width: 100%;
    	position: relative;
    	margin: 0px auto 0;
    	height: 60%;
    	padding-bottom: 0;
    	padding-left: 0;
    	padding-right: 0;
    }
     
    .main_header {
    	position: fixed;
    	top: 0px;
    	max-height: 70px;
    	z-index: 999;
    	width: 100%;
    	padding-top: 17px;
    	background: none;
    	overflow: hidden;
    	-webkit-transition: all 0.3s;
    	transition: all 0.3s;
    	opacity: 0;
    	top: -100px;
    	padding-bottom: 6px;
    	font-family: "Oswald", sans-serif;
    	height: 100%;
    }
    @media only screen and (max-width: 766px) {
     
    .main_header { padding-top: 25px; }
    }
     
    .open-nav { max-height: 300px !important; }
     
    .open-nav .mobile-toggle {
      transform: rotate(-90deg);
      -webkit-transform: rotate(-90deg);
    }
     
    .sticky {
      background-color: rgba(255, 255, 255, 0.93);
      opacity: 1;
      top: 0px;
      border-bottom: 1px solid silver;
    }
     
    .logo {
    	width: 50px;
    	font-size: 25px;
    	color: #8f8f8f;
    	text-transform: uppercase;
    	float: left;
    	display: block;
    	margin-top: 0;
    	line-height: 1;
    	margin-bottom: 10px;
    	margin-left: 8px;
    	position: absolute;
    	left: 0px;
    }
    @media only screen and (max-width: 766px) {
     
    .logo { float: none; }
    }
     
    nav {
    	float: right;
    	width: 70%;
    }
    @media only screen and (max-width: 766px) {
     
    nav { width: 100%; }
    }
     
    nav ul {
      list-style: none;
      overflow: hidden;
      text-align: right;
      float: right;
    }
    @media only screen and (max-width: 766px) {
     
    nav ul {
      padding-top: 15px;
      margin-bottom: 22px;
      float: left;
      text-align: center;
      width: 100%;
    }
    }
     
    nav ul li {
      display: inline-block;
      margin-left: 35px;
      line-height: 1.5;
    }
    @media only screen and (max-width: 766px) {
     
    nav ul li {
      width: 100%;
      padding: 7px 0;
      margin: 0;
    }
    }
     
    nav ul a {
      color: #888888;
      text-transform: uppercase;
      font-size: 12px;
    }
     
    .mobile-toggle {
      display: none;
      cursor: pointer;
      font-size: 20px;
      position: absolute;
      right: 22px;
      top: 0;
      width: 30px;
      -webkit-transition: all 200ms ease-in;
      -moz-transition: all 200ms ease-in;
      transition: all 200ms ease-in;
    }
    @media only screen and (max-width: 766px) {
     
    .mobile-toggle { display: block; }
    }
     
    .mobile-toggle span {
      width: 30px;
      height: 4px;
      margin-bottom: 6px;
      border-radius: 1000px;
      background: #8f8f8f;
      display: block;
    }
     
     
    @-webkit-keyframes 
    scroll {  0% {
     opacity: 1;
     -webkit-transform: translateY(0);
     transform: translateY(0);
    }
     100% {
     opacity: 0;
     -webkit-transform: translateY(20px);
     transform: translateY(20px);
    }
    }
    @keyframes 
    scroll {  0% {
     opacity: 1;
     -webkit-transform: translateY(0);
     -ms-transform: translateY(0);
     transform: translateY(0);
    }
     100% {
     opacity: 0;
     -webkit-transform: translateY(20px);
     -ms-transform: translateY(20px);
     transform: translateY(20px);
    }
    }
    Est-ce possible de rendre le fullscreen en overflow :hidden ?
    Merci pour ton aide et bonne journée,
    dh

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

Discussions similaires

  1. overflow:hidden et float avec Chrome et safari
    Par tom42 dans le forum Mise en page CSS
    Réponses: 4
    Dernier message: 04/05/2011, 15h53
  2. logic:equal avec le contenu d'un champs hidden
    Par mystro7200 dans le forum Struts 1
    Réponses: 4
    Dernier message: 17/03/2009, 10h37
  3. Bug avec overflow: hidden; sous IE
    Par IamKazuya dans le forum Balisage (X)HTML et validation W3C
    Réponses: 2
    Dernier message: 18/05/2007, 16h30
  4. Bug d'affichage sous firefox avec un overflow:hidden
    Par scougirou dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 17/04/2007, 10h41
  5. Overflow:hidden avec ie et firefox, comment bien le declarer ?
    Par j4r0d dans le forum Mise en page CSS
    Réponses: 2
    Dernier message: 12/11/2006, 12h32

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