snowden | Bonjour,
Je cherche à créer une page web perso mais je rencontre un petit soucis avec mon menu et mon entête.
Malgré les tutos trouvés ici et là, je n'arrive pas à fixer mon entête et mon menu et que la partie du dessous ne passe pas au delà. Le "position: fixed;" ne fonctionne pas et je ne comprend pas pourquoi.
Je l'ai enlevé après avoir testé puis échoué.
Merci par avance si vous arrivez à me venir en aide Code HTML :
Code :
- <!DOCTYPE html>
- <html lang="fr" >
- <head>
- <meta charset="UTF-8">
- <title>demo</title>
-
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
-
- <link rel="stylesheet" href="css/style.css">
-
- </head>
- <body>
- <!-- header -->
- <h1><b>Juste un petit essai </b><img src="https://i.imgur.com/SKN67qN.png" width="40" height="40"></h1>
- <!-- menu container -->
- <ul class="container">
- <li class="item item-1"><a href="#demo1">demo1</a></li>
- <li class="item item-2"><a href="#demo2">demo2</a></li>
- <li class="item item-3"><a href="#demo3">demo3</a></li>
- <li class="item item-4"><a href="#demo4">demo4</a></li>
- <li class="item item-5"><a href="#demo5">demo5</a></li>
- <li class="item item-6"><a href="#demo6">demo6</a></li>
- </ul>
-
- <!--<div class="overlay"></div> -->
-
- <div class="card">
- <section id="Accueil" class="main-section">
- <header>Juste un petit essai 2</header>
- <article>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- <p>demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo</p>
- </article>
- </div>
- </section>
-
-
- </div>
- </main>
- <script src='https://code.jquery.com/jquery-3.1.1.min.js'></script>
-
- <script src="js/index.js"></script>
- </body>
- </html>
|
Code CSS :
Code :
- /* variables */
- /* colours */
- /* fonts */
- .transition, .container .item a {
- transition: all 0.25s ease-in-out;
- }
- body {
- height: 100%;
- -webkit-perspective: 900;
- perspective: 900;
- background-color: rgba(220, 231, 235, 0.25);
- font-family: "Ubuntu", sans-serif;
- font-weight: 400;
- text-align: center;
- }
- h1 {
- color: #22bec6;
- font-family: "Source Sans Pro", sans-serif;
- font-weight: 700;
- font-size: 1.75em;
- text-transform: uppercase;
- line-height: 1;
- display: inline-block;
- padding: 0.5em 0.5em;
- border-bottom: 1px solid rgba(48, 69, 92, 0.2);
- }
- .container {
- list-style: none;
- padding: 0;
- margin: 0 5%;
- width: auto;
- display: flex;
- flex-flow: row nowrap;
- justify-content: center;
- }
- .container .item {
- font-family: "Ubuntu", sans-serif;
- border-left: 1px solid #dce7eb;
- }
- .container .item a {
- text-transform: uppercase;
- font-size: 0.7em;
- background: #fefffa;
- color: rgba(48, 69, 92, 0.8);
- padding: 1em 1em;
- display: block;
- text-decoration: none;
- }
- .container .item a:hover {
- background: #22bec6;
- color: #fefffa;
- }
- .container .item-1 {
- border: none;
- }
- @media (max-width: 600px) {
- .container {
- flex-flow: column nowrap;
- }
- .container .item {
- border-left: none;
- border-bottom: 1px solid #dce7eb;
- }
- .container .item a {
- padding: 1.5em 1em;
- }
- }
- .card {
- background: #fff;
- width: 80%;
- box-shadow: 0 5px 8px rgba(0, 0, 0, 0.1);
- border-radius: 4px;
- margin-top: 5%;
- margin-bottom: 5%;
- margin-right: 5%;
- margin-left: 5%;
- }
|
Message édité par snowden le 12-12-2018 à 11:48:07 ---------------
« A l’origine de toute erreur attribuée à l’ordinateur, vous trouverez au moins deux erreurs humaines. Dont celle consistant à attribuer l’erreur à l’ordinateur. »
|