Je n'arrive pas a mettre mes icones

Je n'arrive pas a mettre mes icones - HTML/CSS - Programmation

Marsh Posté le 22-02-2019 à 15:44:24    

Bonjour,
 
j'ai presque termier ma premiere page du site,
mais dans mon footer je n'arrive pas a afficher mes icones social
(facebook, twitter, etc)
 
https://codepen.io/Mtkuma/pen/exwKXX
 
avez vous une idée de se qui ne va pas ?
 
merci, Thibaut

Reply

Marsh Posté le 22-02-2019 à 15:44:24   

Reply

Marsh Posté le 22-02-2019 à 18:02:13    

Bonjour,
 
Tu as mis ton import de css dans une section réservée aux médias de largeur maximale 767 px. Si tu le mets en dehors de la condition, ça fonctionne.


---------------
C'est en écrivant n'importe quoi qu'on devient n'importe qui.
Reply

Marsh Posté le 22-02-2019 à 19:04:41    

je viens d'essayer et ca ne fonctionne pas, (cest a jour sur le pen)
 
j'ai uniquement des losange mais sans le logo du media social


Message édité par monsterteenkuma le 22-02-2019 à 19:11:26
Reply

Marsh Posté le 22-02-2019 à 20:21:08    

Mets-le au début du css. ;)


---------------
C'est en écrivant n'importe quoi qu'on devient n'importe qui.
Reply

Marsh Posté le 22-02-2019 à 21:56:06    

je suis désolé mais... je n'y arrive pas

Reply

Marsh Posté le 23-02-2019 à 12:18:37    

:up:

Reply

Marsh Posté le 23-02-2019 à 13:43:42    

Ben là ça fonctionne sur ton codepen : https://codepen.io/Mtkuma/pen/exwKXX
Non ?


---------------
C'est en écrivant n'importe quoi qu'on devient n'importe qui.
Reply

Marsh Posté le 23-02-2019 à 15:30:36    

effectivement :o
mais quand j'ouvre mon fichier sur navigateur ça ne fonctionne pas (et la page mets vraiment longtemps a charger alors que avant pas)

Reply

Marsh Posté le 23-02-2019 à 15:40:15    

Utilise l'import avec une balise style html au pire.


---------------
C'est en écrivant n'importe quoi qu'on devient n'importe qui.
Reply

Marsh Posté le 23-02-2019 à 17:03:31    

avec un  
 
<link url=("//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" ) />
 
??

Reply

Marsh Posté le 23-02-2019 à 17:03:31   

Reply

Marsh Posté le 23-02-2019 à 17:47:32    

Oui link : https://www.w3schools.com/tags/tag_link.asp


---------------
C'est en écrivant n'importe quoi qu'on devient n'importe qui.
Reply

Marsh Posté le 23-02-2019 à 17:49:55    

ca ne fonctionne pas

Reply

Marsh Posté le 24-02-2019 à 11:02:48    

C'est quoi exactement tout le code de ta page ?


---------------
C'est en écrivant n'importe quoi qu'on devient n'importe qui.
Reply

Marsh Posté le 24-02-2019 à 20:35:25    

html:

Code :
  1. <!doctype html>
  2. <html lang="fr">
  3. <head>
  4.   <meta http-equiv="X-UA-Copatible" content="IE=edge,chrome=1">
  5.     <meta charset="utf-8">
  6.         <title>Gladion</title>
  7.       <link rel="icon" type="image/png" href=".../../../images/icon.png"/>
  8.           <link href='.../../../css/index.css' type='text/css' rel='stylesheet'/>
  9.           <link href='//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' type='text/css' rel='stylesheet'/>
  10.           <script src=".../../../java/index.js"></script>
  11. </head>
  12. <header>
  13.         <ul class="link">
  14.           <li><a href="#"> Panier </a></li>
  15.           <li><a href="#"> Recherche </a></li>
  16.               <ul class="lang">
  17.                 <li><a href="#"> FR </a></li>
  18.                 <li><a href="#"> EN </a></li>
  19.               </ul>
  20.         </ul>
  21.     <div class="header1">
  22.       <div class="titre"> <a href="index.html" title="Gladion SA"> <h1> Gladion </h1></a> </div>
  23.     </div>
  24.     <div class="navbar">
  25.         <ul class="nav">
  26.           <li><a href="../../communaute.html"> Communauté </a> </li>
  27.           <li><a href="../../synopsis.html"> Synopsis </a> </li>
  28.           <li><a href="../../monde.html"> Monde </a> </li>
  29.           <li><a href="../html/boutique/shop.html"> Boutique </a> </li>
  30.         </ul>
  31. </div>
  32.       </div>
  33.     </div>
  34.   </header>
  35. <body>
  36. <main>
  37. <body onload="ano()">
  38. <div class="main">
  39.     <ul class="cd-slider">
  40.       <li>
  41.         <div class="image"><img src="https://images.unsplash.com/photo-1421809313281-48f03fa45e9f?crop=entropy&fit=crop&fm=jpg&h=675&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1000"></div>
  42.         <div class="content">
  43.           <h2><br>Jackets</h2>
  44.           <a href="#">View Gallery</a>
  45.         </div>
  46.       </li>
  47.       <li>
  48.         <div class="image"><img src="https://images.unsplash.com/uploads/1411724908903377d4696/2e9b0cb2?crop=entropy&fit=crop&fm=jpg&h=675&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1000"></div>
  49.         <div class="content">
  50.           <h2><br>Accessories</h2>
  51.           <a href="#">View Gallery</a>
  52.         </div>
  53.       </li>
  54.       <li>
  55.         <div class="image"><img src="https://images.unsplash.com/photo-1416838375725-e834a83f62b7?crop=entropy&fit=crop&fm=jpg&h=675&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1000"></div>
  56.         <div class="content">
  57.           <h2><br>Shoes</h2>
  58.           <a href="#">View Gallery</a>
  59.         </div>
  60.       </li>
  61.       <li>
  62.         <div class="image"><img src="https://images.unsplash.com/35/JOd4DPGLThifgf38Lpgj_IMG.jpg?crop=entropy&fit=crop&fm=jpg&h=675&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1000"></div>
  63.         <div class="content">
  64.           <h2><br>Collection </h2>
  65.           <a href="#">View Gallery</a>
  66.         </div>
  67.       </li>
  68.       <li>
  69.         <div class="image"><img src="https://images.unsplash.com/photo-1453974336165-b5c58464f1ed?crop=entropy&fit=crop&fm=jpg&h=675&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1000"></div>
  70.         <div class="content">
  71.           <h2><br>Photo</h2>
  72.           <a href="#">View Gallery</a>
  73.         </div>
  74.       </li>     
  75.     </ul>
  76.   </div>
  77. </main>
  78. </body>
  79. <footer class="footer">
  80.   <div class="footer-left col-md-4 col-sm-6">
  81.     <p class="about">
  82.       <span> About the company</span> Ut congue augue non tellus bibendum, in varius tellus condimentum. In scelerisque nibh tortor, sed rhoncus odio condimentum in. Sed sed est ut sapien ultrices eleifend. Integer tellus est, vehicula eu lectus tincidunt,
  83.       ultricies feugiat leo. Suspendisse tellus elit, pharetra in hendrerit ut, aliquam quis augue. Nam ut nibh mollis, tristique ante sed, viverra massa.
  84.     </p>
  85. <div class="footer-social-links">
  86.   <a href="#" title="Facebook" target="_blank"><i class="fa fa-facebook"></i></a>
  87.   <a href="#" title="Twitter" target="_blank"><i class="fa fa-twitter"></i></a>
  88.   <a href="#" title="Google+" target="_blank"><i class="fa fa-google-plus"></i></a>
  89.   <a href="#" title="LinkedIn+" target="_blank"><i class="fa fa-linkedin"></i></a>
  90.   <a href="#" title="Dribbble" target="_blank"><i class="fa fa-dribbble"></i></a>
  91. </div>
  92.   </div>
  93.   <div class="footer-center col-md-4 col-sm-6">
  94.     <div>
  95.       <i class="fa fa-map-marker"></i>
  96.       <p><span> Street name and number</span> City, Country</p>
  97.     </div>
  98.     <div>
  99.       <i class="fa fa-phone"></i>
  100.       <p> (+00) 0000 000 000</p>
  101.     </div>
  102.     <div>
  103.       <i class="fa fa-envelope"></i>
  104.       <p><a href="#"> contact@gladion.com</a></p>
  105.     </div>
  106.   </div>
  107.   <div class="footer-right col-md-4 col-sm-6">
  108.     <h2><span> Gladion</span></h2>
  109.     <p class="menu">
  110.       <a href="index.html"> Home</a> |
  111.       <a href="../../faq.html"> FAQ</a> |
  112.       <a href="contact.html"> Contact</a>
  113.     </p>
  114.     <p class="name"> Gladion SA &copy; 2019</p>
  115.   </div>
  116. </footer>
  117. </html>


 
 
Css:

Code :
  1. .footer-social-links{
  2.     font-size: 14px;
  3.   text-align: center;
  4.   margin-top: -22.5%;
  5.   margin-left: 25%;
  6. }
  7. .footer-social-links a{
  8.     width: 25px;
  9.     height: 25px;
  10.     line-height: 25px !important;
  11.     position: relative;
  12.     margin: 0 5px;
  13.     text-align: center;
  14.     display: inline-block;
  15.     color: #111;
  16.    
  17.     -webkit-transition: all 0.27s cubic-bezier(0.300, 0.100, 0.580, 1.000); 
  18.     -moz-transition: all 0.27s cubic-bezier(0.300, 0.100, 0.580, 1.000);
  19.     -o-transition: all 0.27s cubic-bezier(0.300, 0.100, 0.580, 1.000);
  20.     -ms-transition: all 0.27s cubic-bezier(0.300, 0.100, 0.580, 1.000);
  21.     transition: all 0.27s cubic-bezier(0.300, 0.100, 0.580, 1.000);
  22. }
  23. .footer-social-links a i,
  24. .footer-social-links a span{
  25.     position: relative;
  26.     top: 2px;
  27.     left: 1px;
  28. }
  29. .footer-social-links a:before{
  30.     content: "";
  31.     display: inline-block;
  32.     width: 100%;
  33.     height: 100%;
  34.     position: absolute;
  35.     top: 0;
  36.     left: 0;
  37.     border: 1px solid #111;
  38.    
  39.     -webkit-border-radius: 2px;
  40.     -moz-border-radius: 2px;
  41.     border-radius: 2px;
  42.    
  43.     -webkit-transform: rotate(45deg);
  44.     -moz-transform: rotate(45deg);
  45.     -o-transform: rotate(45deg);
  46.     -ms-transform: rotate(45deg);
  47.     transform: rotate(45deg);
  48.    
  49.     -webkit-transition: all 0.27s cubic-bezier(0.300, 0.100, 0.580, 1.000); 
  50.     -moz-transition: all 0.27s cubic-bezier(0.300, 0.100, 0.580, 1.000);
  51.     -o-transition: all 0.27s cubic-bezier(0.300, 0.100, 0.580, 1.000);
  52.     -ms-transition: all 0.27s cubic-bezier(0.300, 0.100, 0.580, 1.000);
  53.     transition: all 0.27s cubic-bezier(0.300, 0.100, 0.580, 1.000);
  54.    
  55. }
  56. .footer-social-links a:hover{
  57.     color: #fff;
  58. }
  59. .footer-social-links a:hover:before{
  60.     background: #111;
  61. }
  62. body{
  63. margin:0 auto; background: white; }
  64. html { overflow-x: hidden; }
  65. h1{font: variant; color: DarkOrange;}
  66. header a:link {
  67. text-decoration:none;
  68. color: white; }
  69. header a:link:hover {
  70.   color: darkorange; }
  71. header a:visited {
  72.   color: white; }
  73. header a:visited:hover {
  74.   color: darkorange; }
  75. /*Menu en haut a droite*/
  76. .link {
  77. list-style-type: none;
  78. display: flex;
  79. justify-content: flex-end;
  80. max-width: 100%;
  81. margin: 0 auto;
  82. padding: 0;
  83. background: black;
  84. font-size: 24px; }
  85. .link li{
  86. display: inline-block;
  87. padding: 1.5% 3%;
  88. transition: 0.5s;
  89. color: white; }
  90. .link ul li a{
  91. padding: 0 20px; }
  92. .lang{
  93. padding: 0.80% 2px; }
  94. /*Titre*/
  95. .header1 {
  96. display: flex;
  97. justify-content: center;
  98. background-color: black;
  99. color: darkorange;
  100. margin: 0 auto;
  101. margin-top: -85px;
  102. font-size: 45px;
  103. max-width: 100%;}
  104. /*Menu principale*/
  105. .navbar {
  106. display: flex;
  107. justify-content: center;
  108. max-width: 100%;
  109. margin-top: -5px;
  110. padding: 0;
  111. background: black;
  112. border-bottom:45px solid;}
  113. .nav {
  114. margin: 0;
  115. padding: 0;
  116. display: flex;
  117. }
  118. .nav li {
  119. list-style: none;
  120. margin: 0 175px;
  121. transition: 0.5s;
  122. }
  123. .nav li a{
  124. position: relative;
  125. text-decoration: none;
  126. padding: 5px;
  127. font-size: 27px;
  128. font-family: sans-serif;
  129. color: #fff;
  130. font-weight: bold;
  131. transition: 0.5s;
  132. }
  133. /*Slider*/
  134. * {
  135. box-sizing: border-box;}
  136. *:focus {
  137.   outline: 0;}
  138. /* Primary Style
  139. --------------------------------*/
  140. .main {
  141. max-width: 100rem;
  142. margin: 0 auto;
  143. padding: 0 2rem;
  144. margin-top: 5%;
  145. }
  146. .text {
  147. font-size: 2rem;
  148. padding: 2rem 0;
  149. -moz-columns: 3;
  150. -webkit-columns: 3;
  151. columns: 3;
  152. }
  153. .text p {
  154. margin-bottom: 2rem;
  155. }
  156. /* Slider Style
  157. --------------------------------------*/
  158. .cd-slider {
  159. position: relative;
  160. width: 100%;
  161. height: 50rem;
  162. overflow: hidden;
  163. margin-top: 6rem;
  164. margin-bottom: 7rem;
  165. }
  166. .cd-slider li {
  167. position: absolute;
  168. top: 0;
  169. left: 0;
  170. width: 100%;
  171. height: 100%;
  172. visibility: hidden;
  173. transition: visibility 0s 1s;
  174.   will-change: visibility;
  175. }
  176. .image {
  177. position: absolute;
  178. top: 0;
  179. left: 0;
  180. width: 70%;
  181. height: 100%;
  182. background-size: cover;
  183. background-position: 50% 50%;
  184. clip: rect(0, 80rem, 50rem, 80rem);
  185. transition: clip .5s cubic-bezier(0.99, 0.01, 0.45, 0.9) .5s;
  186.   will-change: clip;
  187. }
  188. .content {
  189. position: absolute;
  190. top: 0;
  191. right: 0;
  192. width: 100%;
  193. height: 100%;
  194. padding: 2rem 0 0 2rem;
  195. font-size: 9rem;
  196. text-align: right;
  197. }
  198. .content h2 {
  199. text-overflow: ellipsis;
  200. overflow: hidden;
  201. transform: translateY(-30%);
  202. opacity: 0;
  203. transition: transform .5s, opacity .5s;
  204.   will-change: transform, opacity;
  205. }
  206. .content a {
  207. display: inline-block;
  208. font-size: 2rem;
  209. text-transform: lowercase;
  210. padding: 1.5rem;
  211. opacity: 0;
  212. transform: translateY(-100%);
  213. transition: transform .5s .1s, opacity .5s .1s;
  214.   will-change: transform, opacity;
  215. }
  216. /* Current Slide  
  217. -------------------------------------*/
  218. li.current {
  219. visibility: visible;
  220. transition-delay: 0s;
  221. }
  222. li.current .image {
  223. clip: rect(0, 80rem, 50rem, 0);
  224. }
  225. li.current .content h2 {
  226. transform: translateY(0);
  227. opacity: 1;
  228. transition-delay: 1s;
  229. }
  230. li.current .content a {
  231. transform: translateY(0);
  232. opacity: 1;
  233. transition-delay: 1.1s;
  234. }
  235. /* Prev Slide  
  236. ------------------------------------*/
  237. li.prev_slide .image {
  238. clip: rect(0, 0, 50rem, 0);
  239. }
  240. nav {
  241. position: absolute;
  242. bottom: 0;
  243. right: 0;
  244. background: #fff;
  245. z-index: 2;
  246. }
  247. .prev, .next, .counter {
  248. vertical-align: middle;
  249. }
  250. .prev, .next {
  251. position: relative;
  252. display: inline-block;
  253. height: 5rem;
  254. width: 5rem;
  255.   border: 0;
  256.   cursor: pointer;
  257.   background: transparent;
  258. }
  259. .prev::before, .next::before {
  260. content: '';
  261. position: absolute;
  262. top: 50%;
  263.   left: 0;
  264. transform: translateY(-50%);
  265. border: .8rem solid transparent;
  266. border-right-width: 1rem;
  267. border-right-color: #000;
  268. border-left-width: 0;
  269. width: 0;
  270. height: 0;
  271. }
  272. .prev::after, .next::after {
  273. content: '';
  274. position: absolute;
  275. top: 50%;
  276. transform: translateY(-50%) translateZ(0);
  277. left: .5rem;
  278. background: #000;
  279. height: .1rem;
  280. min-height: 1px;
  281. width: 2.5rem;
  282. transition: width .3s;
  283. }
  284. .next::before {
  285. right: 0;
  286.   left: auto;
  287. border-left-width: 1rem;
  288. border-left-color: #000;
  289. border-right-width: 0;
  290. }
  291. .next::after {
  292. right: .5rem;
  293. left: auto;
  294. }
  295. .counter {
  296. display: inline-block;
  297. font-size: 4rem;
  298. font-family: serif;
  299. font-style: italic;
  300. }
  301. .counter span:last-child::before {
  302. content: '/';
  303. margin: 0 1rem;
  304. }
  305. .prev:hover::after, .next:hover::after {
  306. width: 3.5rem;
  307. }
  308. /*footer*/
  309. .footer {
  310.   background-color: black;
  311.   width: 100%;
  312.   text-align: left;
  313.   font-family: sans-serif;
  314.   font-weight: bold;
  315.   font-size: 16px;
  316.   padding: 50px;
  317.   margin-top: 50px;
  318. }
  319. .footer .footer-left,
  320. .footer .footer-center,
  321. .footer .footer-right {
  322.   display: inline-block;
  323.   vertical-align: top;
  324. }
  325. /* footer left*/
  326. .footer .footer-left {
  327.   width: 33%;
  328.   padding-right: 15px;
  329. }
  330. .footer .about {
  331.   line-height: 20px;
  332.   color: #ffffff;
  333.   font-size: 13px;
  334.   font-weight: normal;
  335.   margin: 0;
  336. }
  337. .footer .about span {
  338.   display: block;
  339.   color: #ffffff;
  340.   font-size: 14px;
  341.   font-weight: bold;
  342.   margin-bottom: 20px;
  343. }
  344. .footer .icons {
  345.   margin-top: 25px;
  346. }
  347. .footer .icons a {
  348.   display: inline-block;
  349.   width: 35px;
  350.   height: 35px;
  351.   cursor: pointer;
  352.   background-color: #33383b;
  353.   border-radius: 2px;
  354.   font-size: 20px;
  355.   color: #ffffff;
  356.   text-align: center;
  357.   line-height: 35px;
  358.   margin-right: 3px;
  359.   margin-bottom: 5px;
  360. }
  361. /* footer center*/
  362. .footer .footer-center {
  363.   width: 30%;
  364. }
  365. .footer .footer-center i {
  366.   background-color: #33383b;
  367.   color: #ffffff;
  368.   font-size: 25px;
  369.   width: 38px;
  370.   height: 38px;
  371.   border-radius: 50%;
  372.   text-align: center;
  373.   line-height: 42px;
  374.   margin: 10px 15px;
  375.   vertical-align: middle;
  376. }
  377. .footer .footer-center i.fa-envelope {
  378.   font-size: 17px;
  379.   line-height: 38px;
  380. }
  381. .footer .footer-center p {
  382.   display: inline-block;
  383.   color: #ffffff;
  384.   vertical-align: middle;
  385.   margin: 0;
  386. }
  387. .footer .footer-center p span {
  388.   display: block;
  389.   font-weight: normal;
  390.   font-size: 14px;
  391.   line-height: 2;
  392. }
  393. .footer .footer-center p a {
  394.   color: darkorange;
  395.   text-decoration: none;
  396. }
  397. /* footer right*/
  398. .footer .footer-right {
  399.   width: 35%;
  400. }
  401. .footer h2 {
  402.   color: white;
  403.   font-size: 36px;
  404.   font-weight: normal;
  405.   margin: 0;
  406. }
  407. .footer h2 span {
  408.   color: darkorange;
  409.   margin-left: 15%;
  410. }
  411. .footer .menu {
  412.   color: white;
  413.   margin: 20px 0 12px;
  414.   padding: 0;
  415. }
  416. .footer .menu a {
  417.   display: inline-block;
  418.   line-height: 1.8;
  419.   text-decoration: none;
  420.   color: inherit;
  421. }
  422. .footer .menu a:hover {
  423.   color: darkorange;
  424. }
  425. .footer .name {
  426.   color: darkorange;
  427.   font-size: 14px;
  428.   font-weight: normal;
  429.   margin: 0;
  430. }
  431. @media (max-width: 767px) {
  432.   .footer {
  433.     font-size: 14px;
  434.   }
  435.   .footer .footer-left,
  436.   .footer .footer-center,
  437.   .footer .footer-right {
  438.     display: block;
  439.     width: 100%;
  440.     margin-bottom: 40px;
  441.     text-align: center;
  442.   }
  443.   .footer .footer-center i {
  444.     margin-left: 0;
  445.   }
  446. }
  447. @media screen and ( max-width: 550px ) {
  448. .image { width: 100%; }
  449. .content { padding-right: 2rem; }
  450. nav { left: 0; right: auto; }
  451. }


 
 
java:

Code :
  1. function ano () {
  2.   function init(item) {
  3.     var items = item.querySelectorAll('li'),
  4.         current = 0,
  5.         autoUpdate = true,
  6.         timeTrans = 4000;
  7.        
  8.     //create nav
  9.     var nav = document.createElement('nav');
  10.     nav.className = 'nav_arrows';
  11.     //create button prev
  12.     var prevbtn = document.createElement('button');
  13.     prevbtn.className = 'prev';
  14.     prevbtn.setAttribute('aria-label', 'Prev');
  15.     //create button next
  16.     var nextbtn = document.createElement('button');
  17.     nextbtn.className = 'next';
  18.     nextbtn.setAttribute('aria-label', 'Next');
  19.     //create counter
  20.     var counter = document.createElement('div');
  21.     counter.className = 'counter';
  22.     counter.innerHTML = "<span>1</span><span>"+items.length+"</span>";
  23.     if (items.length > 1) {
  24.       nav.appendChild(prevbtn);
  25.       nav.appendChild(counter);
  26.       nav.appendChild(nextbtn);
  27.       item.appendChild(nav);
  28.     }
  29.     items[current].className = "current";
  30.     if (items.length > 1) items[items.length-1].className = "prev_slide";
  31.     var navigate = function(dir) {
  32.       items[current].className = "";
  33.       if (dir === 'right') {
  34.         current = current < items.length-1 ? current + 1 : 0;
  35.       } else {
  36.         current = current > 0 ? current - 1 : items.length-1;
  37.       }
  38.       var nextCurrent = current < items.length-1 ? current + 1 : 0,
  39.         prevCurrent = current > 0 ? current - 1 : items.length-1;
  40.       items[current].className = "current";
  41.       items[prevCurrent].className = "prev_slide";
  42.       items[nextCurrent].className = "";
  43.       //update counter
  44.       counter.firstChild.textContent = current + 1;
  45.  
  46.     }
  47.    
  48.     item.addEventListener('mouseenter', function() {
  49.       autoUpdate = false;
  50.     });
  51.     item.addEventListener('mouseleave', function() {
  52.       autoUpdate = true;
  53.     });
  54.     setInterval(function() {
  55.       if (autoUpdate) navigate('right');
  56.     },timeTrans);
  57.    
  58.     prevbtn.addEventListener('click', function() {
  59.       navigate('left');
  60.     });
  61.     nextbtn.addEventListener('click', function() {
  62.       navigate('right');
  63.     });
  64.     //keyboard navigation
  65.     document.addEventListener('keydown', function(ev) {
  66.       var keyCode = ev.keyCode || ev.which;
  67.       switch (keyCode) {
  68.         case 37:
  69.           navigate('left');
  70.           break;
  71.         case 39:
  72.           navigate('right');
  73.           break;
  74.       }
  75.     });
  76.     // swipe navigation
  77.     // from http://stackoverflow.com/a/23230280
  78.     item.addEventListener('touchstart', handleTouchStart, false);       
  79.     item.addEventListener('touchmove', handleTouchMove, false);
  80.     var xDown = null;
  81.     var yDown = null;
  82.     function handleTouchStart(evt) {
  83.       xDown = evt.touches[0].clientX;
  84.       yDown = evt.touches[0].clientY;
  85.     };
  86.     function handleTouchMove(evt) {
  87.       if ( ! xDown || ! yDown ) {
  88.         return;
  89.       }
  90.       var xUp = evt.touches[0].clientX;
  91.       var yUp = evt.touches[0].clientY;
  92.       var xDiff = xDown - xUp;
  93.       var yDiff = yDown - yUp;
  94.       if ( Math.abs( xDiff ) > Math.abs( yDiff ) ) {/*most significant*/
  95.         if ( xDiff > 0 ) {
  96.           /* left swipe */
  97.           navigate('right');
  98.         } else {
  99.           navigate('left');
  100.         }
  101.       }
  102.       /* reset values */
  103.       xDown = null;
  104.       yDown = null;
  105.     };
  106.   }
  107.   [].slice.call(document.querySelectorAll('.cd-slider')).forEach( function(item) {
  108.     init(item);
  109.   });
  110. }

Reply

Marsh Posté le 25-02-2019 à 11:49:11    

Cela fonctionne bien, je pense juste que tu as un problème avec le lien vers ton css. Tu demandes d'y accéder en local, il faut donc que tu télécharges le fichier chez toi et que tu adaptes le lien. Tu peux aussi l'utiliser en tant que ressource distante en précisant le protocole "http".

 

Sinon, body est une section un peu différente, c'est une section racine, c'est les autres sections qui doivent être placées dedans.

 

HTML corrigé :

 
Code :
  1. <!doctype html>
  2. <html lang="fr">
  3. <head>
  4.  <meta http-equiv="X-UA-Copatible" content="IE=edge,chrome=1">
  5.  <meta charset="utf-8">
  6.  <title>Gladion</title>
  7.  <link rel="icon" type="image/png" href=".../../../images/icon.png"/>
  8.  <link href='.../../../css/index.css' type='text/css' rel='stylesheet'/>
  9.  <link href='http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' type='text/css' rel='stylesheet'/>
  10.  <script src=".../../../java/index.js"></script>
  11. </head>
  12. <body onload="ano()">
  13.  <header>
  14.   <ul class="link">
  15.    <li><a href="#"> Panier </a></li>
  16.    <li><a href="#"> Recherche </a></li>
  17.    <ul class="lang">
  18.     <li><a href="#"> FR </a></li>
  19.     <li><a href="#"> EN </a></li>
  20.    </ul>
  21.   </ul>
  22.   <div class="header1">
  23.    <div class="titre"> <a href="index.html" title="Gladion SA"> <h1> Gladion </h1></a> </div>
  24.   </div>
  25.   <div class="navbar">
  26.    <ul class="nav">
  27.     <li><a href="../../communaute.html"> Communauté </a> </li>
  28.     <li><a href="../../synopsis.html"> Synopsis </a> </li>
  29.     <li><a href="../../monde.html"> Monde </a> </li>
  30.     <li><a href="../html/boutique/shop.html"> Boutique </a> </li>
  31.    </ul>
  32.   </div>
  33.  </header>
  34.  <main>
  35.   <div class="main">
  36.    <ul class="cd-slider">
  37.     <li>
  38.      <div class="image"><img src="https://images.unsplash.com/photo-1421809313281-48f03fa45e9f?crop=entropy&fit=crop&fm=jpg&h=675&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1000"></div>
  39.      <div class="content">
  40.       <h2><br>Jackets</h2>
  41.       <a href="#">View Gallery</a>
  42.      </div>
  43.     </li>
  44.     <li>
  45.      <div class="image"><img src="https://images.unsplash.com/uploads/1411724908903377d4696/2e9b0cb2?crop=entropy&fit=crop&fm=jpg&h=675&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1000"></div>
  46.      <div class="content">
  47.       <h2><br>Accessories</h2>
  48.       <a href="#">View Gallery</a>
  49.      </div>
  50.     </li>
  51.     <li>
  52.      <div class="image"><img src="https://images.unsplash.com/photo-1416838375725-e834a83f62b7?crop=entropy&fit=crop&fm=jpg&h=675&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1000"></div>
  53.      <div class="content">
  54.       <h2><br>Shoes</h2>
  55.       <a href="#">View Gallery</a>
  56.      </div>
  57.     </li>
  58.     <li>
  59.      <div class="image"><img src="https://images.unsplash.com/35/JOd4DPGLThifgf38Lpgj_IMG.jpg?crop=entropy&fit=crop&fm=jpg&h=675&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1000"></div>
  60.      <div class="content">
  61.       <h2><br>Collection </h2>
  62.       <a href="#">View Gallery</a>
  63.      </div>
  64.     </li>
  65.     <li>
  66.      <div class="image"><img src="https://images.unsplash.com/photo-1453974336165-b5c58464f1ed?crop=entropy&fit=crop&fm=jpg&h=675&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1000"></div>
  67.      <div class="content">
  68.       <h2><br>Photo</h2>
  69.       <a href="#">View Gallery</a>
  70.      </div>
  71.     </li>   
  72.    </ul>
  73.   </div>
  74.  </main>
  75.  <footer class="footer">
  76.   <div class="footer-left col-md-4 col-sm-6">
  77.    <p class="about">
  78.    <span> About the company</span> Ut congue augue non tellus bibendum, in varius tellus condimentum. In scelerisque nibh tortor, sed rhoncus odio condimentum in. Sed sed est ut sapien ultrices eleifend. Integer tellus est, vehicula eu lectus tincidunt,
  79.    ultricies feugiat leo. Suspendisse tellus elit, pharetra in hendrerit ut, aliquam quis augue. Nam ut nibh mollis, tristique ante sed, viverra massa.
  80.    </p>
  81.    <div class="footer-social-links">
  82.     <a href="#" title="Facebook" target="_blank"><i class="fa fa-facebook"></i></a>
  83.     <a href="#" title="Twitter" target="_blank"><i class="fa fa-twitter"></i></a>
  84.     <a href="#" title="Google+" target="_blank"><i class="fa fa-google-plus"></i></a>
  85.     <a href="#" title="LinkedIn+" target="_blank"><i class="fa fa-linkedin"></i></a>
  86.     <a href="#" title="Dribbble" target="_blank"><i class="fa fa-dribbble"></i></a>
  87.    </div>
  88.   </div>
  89.   <div class="footer-center col-md-4 col-sm-6">
  90.    <div>
  91.     <i class="fa fa-map-marker"></i>
  92.     <p><span> Street name and number</span> City, Country</p>
  93.    </div>
  94.    <div>
  95.     <i class="fa fa-phone"></i>
  96.     <p> (+00) 0000 000 000</p>
  97.    </div>
  98.    <div>
  99.     <i class="fa fa-envelope"></i>
  100.     <p><a href="#"> contact@gladion.com</a></p>
  101.    </div>
  102.   </div>
  103.   <div class="footer-right col-md-4 col-sm-6">
  104.    <h2><span> Gladion</span></h2>
  105.    <p class="menu">
  106.    <a href="index.html"> Home</a> |
  107.    <a href="../../faq.html"> FAQ</a> |
  108.    <a href="contact.html"> Contact</a>
  109.    </p>
  110.    <p class="name"> Gladion SA &copy; 2019</p>
  111.   </div>
  112.  </footer>
  113. </body>
  114. </html>
 

Par contre, chez moi les icônes sont mal placées et apparaissent sur le texte en-dessous de "About the company".


Message édité par MaybeEijOrNot le 25-02-2019 à 11:49:48

---------------
C'est en écrivant n'importe quoi qu'on devient n'importe qui.
Reply

Marsh Posté le 26-02-2019 à 13:42:29    

:up:

Reply

Marsh Posté le 26-02-2019 à 13:44:32    

parfait mec! t'es un génie, (oui il faut que je fasse un @media pour tout placer sur chaque ecran) et merci beaucoup (c'etais quoi exactement l'erreur ? jai pas compris les section)

Reply

Marsh Posté le 26-02-2019 à 13:44:34    

Euh ma réponse na va pas ?


---------------
C'est en écrivant n'importe quoi qu'on devient n'importe qui.
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed