28172 sujets

CSS et mise en forme, CSS3

J'ai modifié les couleurs de mon navbar avec l'outil suivant :
http://work.smarchal.com/twbscolor/css/e74c3cc0392becf0f1ffbbbc0
Ca fonctionne sur leur site, mais quand je recopie le code, les couleurs de base (fond noir) ne changent pas.
En vérifiant sur le Nu html checker https://validator.w3.org/nu/#textarea , mon code semble correct.
J'obtiens le message "Document checking completed. No errors or warnings to show"
Et pourtant.
Merci de votre aide

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Mon site bootstrap</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  <link rel="stylesheet" href="css/style.css">
    
  <style>
       .navbar-default {
          background-color: blue;
          background-image: none;
          background-repeat: no-repeat;
        }
        .navbar-default .navbar-brand {
          color: #c8dee3;
        }
        .navbar-default .navbar-brand:hover, .navbar-default .navbar-brand:focus {
          color: #eee4e4;
        }
        .navbar-default .navbar-text {
          color: #c8dee3;
        }
        .navbar-default .navbar-nav > li > a {
          color: #c8dee3;
        }
        .navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
          color: #eee4e4;
        }
        .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
          color: #eee4e4;
          background-color: #0e1354;
        }
        .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus {
          color: #eee4e4;
          background-color: #0e1354;
        }
        .navbar-default .navbar-toggle {
          border-color: #0e1354;
        }
        .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {
          background-color: #0e1354;
        }
        .navbar-default .navbar-toggle .icon-bar {
          background-color: #c8dee3;
        }
        .navbar-default .navbar-collapse,
        .navbar-default .navbar-form {
          border-color: #c8dee3;
        }
        .navbar-default .navbar-link {
          color: #c8dee3;
        }
        .navbar-default .navbar-link:hover {
          color: #eee4e4;
        }

        @media (max-width: 767px) {
          .navbar-default .navbar-nav .open .dropdown-menu > li > a {
            color: #c8dee3;
          }
          .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
            color: #eee4e4;
          }
          .navbar-default .navbar-nav .open .dropdown-menu > .active > a, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
            color: #eee4e4;
            background-color: #0e1354;
          }
        }
    
  </style>
</head>
<body>

<nav class="navbar navbar-inverse">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="#">Bootstrap</a>
    </div>
    <div>
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">Home</a></li>
        <li><a href="#">Menu 1</a></li>
        <li><a href="#">Menu 2</a></li>
         <li><a href="#">Menu 3</a></li>
         <li><a href="#">Menu 4t</a></li>
      </ul>
    </div>
  </div>
</nav>
  
<div class="container">

</div>

</body>
</html>

Modifié par fredericmarcel (29 Nov 2015 - 11:53)