Когда я меняю Css, он не виден в файле Html - PullRequest
0 голосов
/ 11 марта 2020

Если я изменю что-либо в Css, например, если я изменю 20px на 300px, это не сработает. Это также имеет место с цветами или текстом. Но если я изменю текст в файле Html, это сработает. Я не могу найти в коде Css или в коде Html ничего неправильного. Файл Css связан с файлом Html, но все равно не работает. Может кто-нибудь, пожалуйста, помогите.

Код Css:

@charset "utf-8";

body {
  font: 0.9em Tahoma, Verdana, Arial;
  line-height:172%;
  background-color: #ffffff;
  margin: 0px;
}

.center {
  display: block;
  margin-left: 0px;
  margin-right: 0px;
}

#containercontainer {
  display: block;
  margin-left: 0px;
  margin-right: 0px;
  padding: 30px;

}


/* bovenste kopje ========================================*/
h1.titel {
  color: black;
  font: Gill Sans, sans-serif;
  font-size: 20px;
  margin-bottom: -2px;
  margin-top: 0px;
}


#titel {
  display: block;
  margin-left: 0px;
  margin-right: 0px;
  padding-left: 10px;
  border-bottom: solid black 1px;
  width: 5.5%;
  left: 45%;
  position: relative;
  margin-bottom: 20px;
}




/* De Slideshow ========================================*/


.fling-minislide {
    width:100%; 
    height:100%; 
    padding-bottom: 0%; 
    overflow:hidden; 
    position:relative; 
    }

.fling-minislide img{ 
    position:absolute; 
    animation:fling-minislide 15s infinite; 
    opacity: 0;  
    size: 100% 100%;
    }

@keyframes fling-minislide {33%{opacity:1;} 60%{opacity:0;}} 
    .fling-minislide img:nth-child(3){animation-delay:0s;}
    .fling-minislide img:nth-child(2){animation-delay:5s;}
    .fling-minislide img:nth-child(1){animation-delay:10s;}

#slideshow {
  display: block;
  margin-left: 0px;
  margin-right: 0px;
  padding: 0px;
  float: center;
  border: solid black 2px;
  width: 55%;
  height: 300px;
  position: relative;
  left: 21%;
}

/* Het nieuws blokje ========================================*/

img.nieuws {
  margin-top: -20px;
  height: 300px;
  width: 400px;
  position: relative;
  border: solid black 2px;
  margin-bottom: 20px;
}

p.nieuws {
  float: right;
  margin-top: -10px;
  position: relative;
  margin-bottom: 20px;

}

#nieuws {
  display: block;
  margin-left: 0px;
  margin-right: 0px;
  padding-left: 10px;
  width: 78%;
  height: 50px;
  left: 10%;
  position: relative;
  margin-bottom: 20px;
}

/* Het vragen blokje ========================================*/


#vragen {
  display: block;
  margin-left: 0px;
  margin-right: 0px;
  padding-left: 10px;
  width: 80%;
  padding-left: 0px;
  height: 1000px;
  left: 10%;
  position: relative;
  margin-bottom: 20px;
  top: 300px;
  border: solid black 1px;  
}


p.A{
  margin-top: 10px;
  border-bottom: solid black 1px;  
  font-size: 22px;
  margin-left: 400px;
}



#cbrlogo {
    background: #fff;
    width: 50px;
}

#container {
  width: relative;
  padding: relative;
  background: #fff;
  min-height: 500px;
}

.afbeelding_container {
  position: relative;
  float: left;
  margin-left: 0px;
}

.afbeelding_container .tekst_container {
  position: relative;
  top: 25px;
  left: 50px;
  color: #00f;
  font-size: 36px;

}

.schoon {
  clear: both;
}


#overzicht {
  margin-left: 25px;
}

.links {
  float: left;
  width: 320px;
}

#rechts {
  float: right;
}

#onder {
  clear: both;
}

.breder {
  width: 4000px;
}

ul {
  padding-left: 35px;
  padding-right: 35px;
  list-style: none;
  background: 00f;
}

hr {
  margin: 0px 0;
  height: 1px;
  border: 1px solid #fff;
  border-top: 10px solid #00f;
  background-color: #fff;
}

a:link {
  color: black;
  text-decoration: none;
}

a:visited {
  color: black;
  text-decoration: none;
}

a:hover {
  color: black;
  text-decoration: none;
}

a:active {
  color: blue;
  text-decoration: none;
}

.menu {
    display: block;
    margin: 0px;
    padding:0px;
    position: absolute;
    width: 100%;
    background-color: #3695F6;
}

ul.menu {
    list-style-type: none;
}

img.menu {
    height: 40px;
    width: 30%;
    position:relative;
    margin: 10px;
    margin-right: 0px;
    list-style-type: none;
}

.menu li {
    float:left;
    position:relative;
    width: 200px;
    text-align:center;
    text-decoration: none;
    margin: 0px;
    padding: 0;
}

.menu li a {
    display: block;
    padding-bottom: 20px;
    padding-right: 10px;
    padding-top: 10px;
    padding-left: 0px;
    text-decoration: none;
    position: relative;
    z-index: 100;
}

.menu li a span{
  display: block;
  padding-top: 10px;
  font-weight: 700;
  font-size: 20px;
  color: rgba(255, 255, 255,);
  font-size: 18px;
}

.menu li:hover span{
  color: #FFFFFF;
}

th {
  padding: 10px 30px 10px 30px;
}

td {
  padding: 0 30px 0 30px;
}

td.muteren {
  padding: 0 0 0 10px;
}


tbody:before {
    line-height:1em;
    display:block;
}

thead {
    text-align: left;
}

Код Html:

<?php 
    require 'core/init.php';
?>

<!DOCTYPE html>
<html lang="nl">

  <head>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="css/style.css" >
    <title>CBR Theorie examen </title>  
  </head>

  <body>    
    <div id="container">
      <?php
          echo '<div>';
          include 'includes/menu.php';
          echo '</div>';

      ?>

    <div id="containercontainer">

        <div id="titel">
            <h1 class="titel">Home</h1>
        </div>
<!-- de slideshow ======================================================== -->      
      <div id="slideshow">
            <div class="fling-minislide">
                <img src="images\slideshow1.jpg" alt="Slideshow 3" />
                <img src="images\slideshow2.jpg" alt="Slideshow 2" />
                <img src="images\slideshow3.jpg" alt="Slideshow 1" />
            </div>
      </div>

<!-- Nieuws  ================================================================================== -->       
        <div id="nieuws">
            <h1 style="width: 300px;" class="titel">Digitaal Examen</h1><br>
            <img class="nieuws" src="images/computer.jpg" alt="nieuws plaatje" />
            <p class="nieuws">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis in erat laoreet sem <br>
            scelerisque pulvinar. Pellentesque habitant morbi tristique senectus et netus et <br>
            malesuada fames ac turpis egestas. Suspendisse interdum placerat leo, ac iaculis <br>
            posuere eu. In non pulvinar ipsum. Vestibulum pretium sem nec enim pharetra, ac <br>
            sapien tempor. Praesent odio ipsum, vehicula at viverra ut, consectetur et sapien.<br>
            vel congue dolor, sit amet pulvinar felis. Pellentesque et turpis viverra, <br>
            tempus metus. Nunc porta sapien eget elit maximus dictum sed sed dolor. <br>
            velit et nibh dapibus, ac vulputate orci bibendum. Donec blandit faucibus <br>
            malesuada fames ac turpis egestas. Suspendisse interdum placerat leo, ac iaculis <br>
            posuere eu. In non pulvinar ipsum. Vestibulum pretium sem nec enim pharetra, ac <br>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis in erat laoreet sem <br>
            scelerisque pulvinar. Pellentesque habitant morbi tristique senectus et netus et <br>   
            </p>
        </div>

<!-- Veel gestelde vragen ======================================================================= -->       
        <div id="vragen">
            <p class="A">Veel gestelde vragen</p>
        </div>

     </div> 

    </div>
  </body>

</html>

Ответы [ 2 ]

2 голосов
/ 11 марта 2020

Добро пожаловать в SO

, чтобы решить эту проблему. если у вас есть эта проблема в любое время. Добавьте к нему номер версии = следующим образом:

<link rel="stylesheet" type="text/css" href="css/style.css?V=01">

Я не знаю, почему именно, но это связано с вашим браузером, и кэш не синхронизируется правильно.

1 голос
/ 11 марта 2020

Если вы загружаете файлы на сервер и просматриваете их в своем браузере, есть большая вероятность, что таблица стилей будет загружена из кэша вашего браузера в безопасные сетевые ресурсы. Обычно используемая техника, известная как очистка кэша, добавляет ?ver=X, что заставляет браузер повторно загружать файл, потому что он имеет имя, отличное от того, которое он кэшировал. В вашем случае это будет выглядеть так:

<link rel="stylesheet" type="text/css" href="css/style.css?ver=1">

Поскольку вы используете php, вы можете вместо этого использовать ?ver=<?php echo uniqueID(); ?>, который создает новый идентификатор всякий раз, когда html запрашивается с сервера - полезно при разработке. Не забудьте удалить его в окончательной версии, потому что кеширование в браузере - полезная функция.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...