skip to Main Content

I am making a website to host my games I have made and the CSS I made doesn’t seem to be applying. the code is here.

I am a beginner at coding with HTML and CSS, so I just looked up different codes and tutorials and they didn’t seem to work.

2

Answers


  1. The problem is in the first line of your style.css file.
    you can’t define css properties without specifying any selector, so it makes all your styles not work!
    comment that line and see your styles apply or specify a selector for your background property

    Login or Signup to reply.
  2. Your CSS Code

    background-image: linear-gradient((rgba(0,0,0,0.5), rgba(0,150,0,0.5));
    h1,p{
      color: white;
      text-align: center;
    }
    

    is written in a wrong format, the way you have mentioned background-image
    is wrong, it must be mentioned for a specific tag, if you want that background for the whole page the correct code is:

    body{
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,150,0,0.5));
    }
    h1,p{
      color: black;
      text-align: center;
    }
    

    And also you had added extra set of parenthesis linear-gradiant.

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