Home  >  Q&A  >  body text

CSS changes are not reflected. Why?

<p>I'm developing my website and whenever I add some new lines to the CSS file, it just doesn't want to use the lines I made. </p> <p>They should be fine, though. </p> <pre class="brush:php;toolbar:false;">.what-new { padding:2em 0 4em; text-align:center; } .what-new h3 { font-size:4em; font-weight:700; color:#000; margin:0.5em 0;</pre> <p>Give me an example. </p> <p>The CSS file was working at some point, but somewhere it stopped working with my file. However, it is linked in < <strong>head</strong> >. </p> <pre class="brush:php;toolbar:false;"><link rel="stylesheet" href="style/css_2-play.css" type="text/css"/></pre> ; <p>My HTML code is as follows (note this is only part of the code): </p> <pre class="brush:php;toolbar:false;"><div class="what-new"> <div class="container"> <h3>What's new</h3> <div class="blog-news"> <div class="blog-news-grid"> <div class="news-grid-left"> <h4>06</h4> <small>of january 2015</small> </div></pre> <p>Does anyone know a solution? </p>
P粉012875927P粉012875927395 days ago543

reply all(2)I'll reply

  • P粉346326040

    P粉3463260402023-08-28 13:57:34

    This means that either your CSS rules are not being applied or your CSS file is cached.

    Possible reasons are:

    Check how the rule is applied through your browser's developer tools (open with F12).

    Tip: In the CSS panel, rules are arranged in descending order of importance.

    Use some validator.

    Press CTRLF5 to force refresh the browser cache resources.

    Tip: This Q&A explores this topic.

    Force refresh the server cached resources by entering the URL of the static resource in the address bar and pressing CTRLF5 That page ( i.e. CSS files).

    Tip: To quickly open the URL of a CSS file, use Open link in new tab in your browser's developer tools, or click Open in HTML CSS links with View source code.

    reply
    0
  • P粉022140576

    P粉0221405762023-08-28 10:46:28

    I forgot to turn off { in the CSS file. That's why all the code is not displayed on the page.

    reply
    0
  • Cancelreply