Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2777 connectés 

  FORUM HardWare.fr
  Programmation
  HTML/CSS

  Problème d'adaptation du header avec bootstrap

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Problème d'adaptation du header avec bootstrap

n°2273292
vicvan
Posté le 12-01-2016 à 14:08:28  profilanswer
 

Bonjour,  
 
Je suis débutant en dév, je voudrais rendre visible et adapter mon header au format mobile, seulement la photo s'affiche.  
De plus, impossible d'ajuster les boutons social médias à la taille xs, je pense avoir un problème dans mon code mais impossible de le trouver.
J'utilise HTML/CSS avec bootstrap et Jquery(ci dessous mon code : )
 
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
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
<!DOCTYPE html>
<html>
 
  <head>
 
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>CV</title>
    <meta name="description" content="">
 
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
 
 
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
 
    <!-- Sommaire HTML
      1. Header
      2. Navigation
      3. Content
        3.1 social bouton
        3.2 page header
        3.3 page content
    -->
 
 
   </head>
 
    <style type="text/css">
 
 
/* Mobile */
 
@media (min-width: 768px){
 
  /* header */
 
  header {
 
    display : block;
    position : fixed;
    top : 0px;
    height : 300px;
    width : 355px;
    background-image : url("Source/background.jpg" );
  }
 
.photo  {
 
  margin-top : 50px;
  margin-left : 35px;
 
 
}
 
 
  /* Content */
 
  .affix-content .container {
    width: 700px;
  }  
 
  html,body{
    background-color: #34393e;
    height: 100%;
    overflow: hidden;
  }
 
  .navbar-default {
 
    background-color : #34393e;
 
  }
 
  .navbar-default .navbar-brand {
 
    color : #b9b5b5;
  }
    .affix-content .container .page-header{
    margin-top: 0;
  }
 
  /* Navigation */
 
  .sidebar-nav{
        position:fixed;
        top : 300px;
        width:100%;
  }
  .affix-sidebar{
    padding-right:0;
    font-size: 20px;
    padding-left: 0;
  }  
  .affix-row, .affix-container, .affix-content{
    height: 100%;
    margin-left: 0;
    margin-right: 0;    
  }
  .affix-content{
    background-color:white;
  }
  .sidebar-nav .navbar .navbar-collapse {
    padding: 0;
    max-height: none;
  }
  .sidebar-nav .navbar{
    border-radius:0;
    margin-bottom:0;
    border:0;
  }
  .sidebar-nav .navbar ul {
    float: none;
    display: block;
    height : 350px;
  }
  .sidebar-nav .navbar li {
    float: none;
    display: block;
  }
  .sidebar-nav .navbar li a {
    padding-top: 16px;
    padding-left : 40px;
    padding-bottom: 16px;
    color : #ffffff;
 
  }  
 
  /*social */
   
  .social {
  display : block;
  float : right;
  margin-top : 25px;
  margin-right : 25px;
}
 
.btn-circle {
  width: 40px;
  height: 40px;
  text-align: center;
  padding: 6px 0;
  font-size: 12px;
  line-height: 1.42;
  border-radius: 20px;
}
 
.btn {
 
  background-color : #34393e;
  border : 1px solid #34393e;
 
}
 
.btn, .btn-default:hover {
 
  color : #ff5b2b;
 
}
 
i {
  color : #ffffff;
 
}
}
 
/* Tabelette & petit ordinateur de bureau */
 
@media (min-width: 769px){
 
  /* header */
 
   header {
 
    display : block;
    position : fixed;
    top : 0px;
    height : 300px;
    width : 355px;
    background-image : url("Source/background.jpg" );
  }
 
.photo  {
 
  margin-top : 50px;
  margin-left : 35px;
 
 
}
 
  /* Content */
 
  .affix-content .container {
    width: 600px;
  }
    .affix-content .container .page-header{
    margin-top: 0;
  }  
 
  /*social */
   
  .social {
  display : block;
  float : right;
  margin-top : 25px;
  margin-right : 25px;
}
 
.btn-circle {
  width: 40px;
  height: 40px;
  text-align: center;
  padding: 6px 0;
  font-size: 12px;
  line-height: 1.42;
  border-radius: 20px;
}
 
.btn {
 
  background-color : #34393e;
  border : 1px solid #34393e;
 
}
 
.btn, .btn-default:hover {
 
  color : #ff5b2b;
 
}
 
i {
  color : #ffffff;
 
}
}
 
/* Moyen ordinateur de bureau */
 
@media (min-width: 992px){
 
  /* header */
 
  header {
 
    display : block;
    position : fixed;
    top : 0px;
    height : 300px;
    width : 355px;
    background-image : url("Source/background.jpg" );
  }
 
.photo  {
 
  margin-top : 50px;
  margin-left : 35px;
 
 
}
   
 
  /* Content */
 
  .affix-content .container {
  width: 900px;
  }
    .affix-content .container .page-header{
    margin-top: 0;
  }
 
  /*social */
   
  .social {
  display : block;
  float : right;
  margin-top : 25px;
  margin-right : 25px;
}
 
.btn-circle {
  width: 40px;
  height: 40px;
  text-align: center;
  padding: 6px 0;
  font-size: 12px;
  line-height: 1.42;
  border-radius: 20px;
}
 
.btn {
 
  background-color : #34393e;
  border : 1px solid #34393e;
 
}
 
.btn, .btn-default:hover {
 
  color : #ff5b2b;
 
}
 
i {
  color : #ffffff;
 
}
}
 
/* Ordinateur de bureau */
 
 
@media (min-width: 1220px){
 
  /* header */
 
    header {
 
    display : block;
    position : fixed;
    top : 0px;
    height : 300px;
    width : 355px;
    background-image : url("Source/background.jpg" );
  }
 
.photo  {
 
  margin-top : 50px;
  margin-left : 35px;
 
 
}
 
  /* Content */
 
  .affix-row{
    overflow: hidden;
  }
 
  .affix-content{
    overflow: auto;
  }
 
  .affix-content .container {
    width: 1000px;
  }
 
  .affix-content .container .page-header{
    margin-top: 0;
  }
  .affix-content{
    padding-right: 30px;
    padding-left: 30px;
  }  
  .affix-title{
    border-bottom: 1px solid #ecf0f1;
    padding-bottom:10px;
  }
 
  /* Navigation */
 
  .navbar-nav {
    margin: 0;
  }
  .navbar-collapse{
    padding: 0;
  }
  .sidebar-nav .navbar li a:hover {
    background-color: #ff5b2b;
    color: white;
  }
  .sidebar-nav .navbar li a > .caret {
    margin-top: 8px;
  }  
 
  /*social */
 
  .social {
  display : block;
  float : right;
  margin-top : 25px;
  margin-right : 25px;
}
 
.btn-circle {
  width: 40px;
  height: 40px;
  text-align: center;
  padding: 6px 0;
  font-size: 12px;
  line-height: 1.42;
  border-radius: 20px;
}
 
.btn {
 
  background-color : #34393e;
  border : 1px solid #34393e;
 
}
 
.btn, .btn-default:hover {
 
  color : #ff5b2b;
 
}
 
i {
  color : #ffffff;
 
}
}
 
 /*page content (tous les formats) */
 
   
 
 h1 {
  color : #34393e;
  padding-left : 30px;
}
 
h2 {
  color : #34393e;
  font-style : italic;
  padding-left : 30px;
}
img  {
 
  padding-left : 30px;
}
p {
  text-align : justify;
  font-style : italic;
  color : #b9b5b5;
  font-size : 20px;
  padding-left : 50px;
  padding-right : 20px;
}
 
.nom, .age, .adresse, .numero, .email {
 
display : block;
margin-top: 10px;
margin-left : 0px;
background-color : #e7e7e7 ;
width : 450px;
}
 
 
.rectangle{
 
  width:175px;
  height:28px;
  background:#ff5b2b;
}
 
.triangle {
    margin-left : 0px;
    width: 0;
    height: 0;
    border-top: 0px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #ff5b2b;
}
 
table {
 
  margin-top : 10px;
  margin-left : 150px;
 
}
 
td /* Toutes les cellules des tableaux... */
{
    padding: none;
    margin : none;
    padding-left : 20px; /* auront une bordure de 1px */
}
 
#nom, #age, #adresse, #numero, #email {
 
  font-style : normal;
  padding-left : 10px;
}
 
.name1, .name2, .name3, .name4, .name5 {
 
padding-left : 10px;
font-style : normal;
color : #ffffff;
}
 
 
    </style>
 
    <body>
 
<!-- 1. header -->
 
    <header class="row affix-row" class="col-sm-4 col-md-3">
    <img class="photo" src="Source/photo.png" alt="photo"></img>
    </header>
 
<!-- 2. navigation-->
 
    <div class="row affix-row">
      <div class="col-sm-4 col-md-3 affix-sidebar">
      <div class="sidebar-nav">
      <div class="navbar navbar-default" role="navigation">
      <div class="navbar-header"><!-- mobile -->
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-navbar-collapse">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          </button>
          <span class="visible-xs navbar-brand">Sidebar menu</span>
    </div>
 
      <div class="navbar-collapse collapse sidebar-navbar-collapse">
        <ul class="nav navbar-nav" id="sidenav01">
          <li class="active"><a href="#"><span class="glyphicon glyphicon-user"></span>&nbsp; Profil </a></li>
          <li><a href="#"><span class="glyphicon glyphicon-briefcase"></span>&nbsp; Work </a></li>
          <li><a href="#"><span class="glyphicon glyphicon-file"></span>&nbsp; Resume</a></li>
          <li><a href="#"><span class="glyphicon glyphicon-folder-open"></span>&nbsp; Portofolio </a></li>
          <li><a href=""><span class="glyphicon glyphicon-envelope"></span>&nbsp; Contact</a></li>
        </ul>
      </div><!--/.nav-collapse -->
 
      </div>
      </div>
    </div>
 
 
<!-- 3. content -->
 
    <div class="col-xs-12 col-sm-8 col-md-9 affix-content">
      <div class="container">
 
      <!-- 3.1 bouton social -->
 
      <div class="social" class="row" class="col-md-12 text-center v-center">
        <a class="btn btn-default btn-circle" href="https://plus.google.com/u/0/+VictorVantrepote"><i class="fa fa-google-plus fa-2x"></i></a>
        <a class="btn btn-default btn-circle" href="https://www.linkedin.com/profile/view?id=AAMAABGrYLUBKQ3ffXIeqZIKTUrzz6BscUZQcko&trk=hp-identity-name"><i class="fa fa-linkedin fa-2x"></i></a>
      </div>
 
      <!-- 3.2 page header -->
 
      <div class="page-header">
        <h1><strong>Victor</strong></h1>
        <h2>.......</h2>
        <img src="Source/forme.jpg" alt="forme"></img>
          </br>
          </br>
        <p>Ultima Syriarum est Palaestina per intervalla magna protenta, cultis abundans terris et nitidis et civitates habens quasdam egregias, nullam nulli cedentem sed sibi vicissim velut ad perpendiculum aemulas.</p>
          </br>
      </div>
 
      <!-- 3.3 page content -->
 
      <div class="content">
          <h1 style="color : #b9b5b5">Informations personnelles</h1>
          <img src="Source/forme.jpg" alt="forme"></img>
        </br>
 
        <div class="table-responsive">
 
        <table>
 
        <tr>
        <td><div class="rectangle"><p class="name1">Nom</p></div></td>
        <td><div class="nom"><p id="nom">Victor</p></div></td>
        </tr>
 
        <tr>
        <td><div class="rectangle"><p class="name2">Age</p></div></td>
        <td><div class="age"><p id="age">22 ans</p></div></td>
        </tr>
 
        <tr>
        <td><div class="rectangle"><p class="name3">Adresse</p></div></td>
        <td><div class="adresse"><p id="adresse">.................</p></div></td>
        </tr>
 
        <tr>
        <td><div class="rectangle"><p class="name4">Numéro</p></div></td>
        <td><div class="numero"><p id="numero">..............</p></div></td>
        </tr>
 
        <tr>
        <td><div class="rectangle"><p class="name5">Email</p></div></td>
        <td><div class="email"><p id="email">................</p></div></td>
        </tr>
      </table>
      </div>
      </div>
 
      </div>
    </div>  
 
 
 
 
 
     
    </body>
 
      <!-- jQuery -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <!-- Javascript de Bootstrap -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
 
</html>
 
 
 
Merci de votre réponse


---------------
vicvan vous remercie
mood
Publicité
Posté le 12-01-2016 à 14:08:28  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  HTML/CSS

  Problème d'adaptation du header avec bootstrap

 

Sujets relatifs
Probleme compatibilité VBA MSFLEXGRID Excel 2013Problème de date dans base de données
Problème avec DreamweaverProblème avec mon programme
(VB.NET) Problème integration dll (au logiciel SmarTeam)Chemin relatif : problème
problème double comparaisonprobleme media queries
probleme au niveau de mes conditions[C] Problème d'affichage dans le résultat de ma fonction C
Plus de sujets relatifs à : Problème d'adaptation du header avec bootstrap


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR