My CSS document doesn't change anything on my html doc


#1
<!DOCTYPE html>
<html>
  <head>
    <title>My Website </title>
  <link rel="stylesheet" type="text/css" href="mainstyle.css"/>
  </head>
  <body>
    <h1> computing student,musicain,graphic designer</h1>
    <ul>
      <li><a href="home.html">Home</a></li>
      <li><a href="CV.html">CV</a></li>
      <li><a href="Contact.html">Contact</a></li>
      <li><a href="Bio.html">Bio</a></li>
    </ul>
  </body>
</html>

CSS: File is named: mainstyle.css

body{
  background-color: red;
}

I followed how to link them but it still isn’t working


#4

It works for me. Are the files in the same folder?


#5

I’m sorry, this issue doesn’t really seem to be Atom/Electron related.


#6

I’m using a MacBook Pro but the changes don’t appear when using the html preview-package ,and both the files are in the same folder. Any ideas what the problem is ?


#7

That’s why I put it in #uncategorized.


#8

You need to be precise about package names. Are you using atom-html-preview? Because I just tested in that and it works fine.


#9

Yeh i have atom-html-preview installed


#10

it still isn’t changing on the preview


#11

I feel so stupid i have just figured it out , lol i must close the css file then the preview works. Thanks for the help much appreciated :smiley:


#12

Are you sure it needed to be closed? Because the screenshot says that it’s not saved, and if it’s not saved, then the preview package can’t read the latest version of the file.


#13

yeh you’re right thanks man really appreciate it