CSS not working in Chrome

后端 未结 8 1797
再見小時候
再見小時候 2021-01-18 02:39

The CSS is not loading for this page of the website I am working on: http://www.thesanfordcenter.net/sanford-center. It happens only in Chrome, but is not a caching issue as

相关标签:
8条回答
  • 2021-01-18 03:06

    The problem could be caused because the browser can't load files:

    Failed to load resource: the server responded with a status of 404 (Not Found) error in server

    0 讨论(0)
  • Are you certain the path is correct? The developer tools in Chrome show the following error.

    Failed to load resource: the server responded with a status of 404 (ERROR: The file requested could not be found.) http://www.thesanfordcenter.net/CircularContentCarousel/css/demo.css

    0 讨论(0)
  • 2021-01-18 03:17

    Comparing css links between the page you referenced and sub-pages, you have a "media" attribute in your link:

    Problem:

    <link href="/stylesheets/css_Sanford.css" rel="stylesheet" type="text/css" media="only screen and (min-device-width: 481px" />
    

    Working:

    <link href="/stylesheets/css_Sanford.css" rel="stylesheet" type="text/css" />
    

    Try removing the "media" attribute and it should work fine.

    More specifically, it does not appear that "only" is a valid operating for the media attribute. See this W3Schools page for details.

    0 讨论(0)
  • 2021-01-18 03:23

    In Google Chrome

    >> goto settings
    >> search for cache
    >> clear browsing data
    >> check cached images and files (the past hour / day)
    >> clear browsing data
    

    and goto your webpage and press "Ctrl + r"

    Hope this solves your issue Cheers.

    0 讨论(0)
  • 2021-01-18 03:26

    Make sure that your CSS and HTM/HTML files use the same encoding !

    If your HTM/HTML files are encoded as UNICODE, your stylesheet has to be as well.

    IE and Edge are not fussy : stylesheets are rendered regardless of the encodings. But Chrome is totally intolerant of unmatched encodings.

    I tried every solution/suggestion i could find all over the Internet before i noticed, in my text editor, that i was using different encodings. Once I saved the stylesheets with the same encoding used for the web pages, the problem disappeared.

    0 讨论(0)
  • 2021-01-18 03:26

    It doesn't exist:

    this is a 404 not found:

    http://www.thesanfordcenter.net/CircularContentCarousel/css/demo.css

    0 讨论(0)
提交回复
热议问题