skip to Main Content

I have just started learning to code.
I made my multipage resume in HTML, and now I began to add style.
I was expecting the change to come in all pages, but it was only the index page that showed the changes. Other pages did not.

What am I doing wrong here?
Please note that this was done locally in VS code.

I first created a style.css with the following simple code.

    html {
        background:greenyellow;
        font-size: 12;
        font-weight: bold;
        text-align: center;
        }

And then I linked my index.html to the stylesheet.

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=devide-width, initial-scale=1.0">
    <link
        rel="stylesheet"
        href="./style.css"
    />
    <title>Vaibhav's e-Resume></title>
</head>

2

Answers


  1. If you are using multiple html pages and you are using same css file for each of them you should link the same css file in every html file and use class and id to organize the styling other wise it can mess up your site

    Login or Signup to reply.
  2. Link the same css file with all of your html files.

    Also please share the screenshot of directory structure so I can get more insight of the project.

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