skip to Main Content

I am developing a website with multiple pages and using the same external stylesheet for all of them. On most of the pages the stylesheet has the desired effect, except on one. On this page whether I add the stylesheet or not it looks exactly the same. I cannot figure out what the problem is.

>Tag selectors ***************/ body {
  background-color: rgb(225, 226, 231);
}

h1 {
  color: #66bfbf;
  font-weight: bolder;
  text-align: center;
}
<!DOCTYPE html>
<html>

<head>
  <link rel="stylesheet" href="css/test.css">
</head>

<body>
  <h1>Call Actions</h1>
</body>

</html>

The result:
The resultant webpage

On the other pages it looks like this:

enter image description here

2

Answers


  1. body {
      background-color: rgb(225, 226, 231);
    }
    
    h1 {
      color: #66bfbf;
      font-weight: bolder;
      text-align: center;
    }
    <!DOCTYPE html>
    <html>
    
    <head>
      <link rel="stylesheet" href="css/test.css">
    </head>
    
    <body>
      <h1>Call Actions</h1>
    </body>
    
    </html>

    your problem here

    <link rel="stylesheet" href="css/test.css">
    

    you can check chrome console
    file test.css not found / 404

    <link rel="stylesheet" href="https://example.com/css/test.css">
    

    replace https://example.com with your website

    Login or Signup to reply.
  2. it works perfectly fine may be you made some error linking the css file with html check with that enter image description here
    ,

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search