style.css stylesheet not updating in Internet Explorer
ianmorris (0)

My stylesheet does not appear to update when using Internet Explorer 11.379 (Win 10), after just a few steps:

  • Start a new HTML, CSS
  • Add to the style.css file: body {background:pink}, click Run, all OK.
  • Add to index.html, after the <script> link, the HTML: <h1>Hello World</h1>, click Run, all OK.
  • In style.css, add the line: h1 {color:red;text-align: center}, click Run, and I don't see red centred text.
    It appears to work with my Firefox.

Now that I subsequently view my Repl with my given shortcut, when I run it first time, it is all OK. If I then change my stylesheet line to h1 {color:blue;) and click run, I do not see blue, left-aligned text.

You are viewing a single comment. View All
LynnOng (26)

Try this

<!DOCTYPE html>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <link href="style.css" rel="stylesheet" type="text/css" />
  <body style = "background:pink; color:pink">
    <script src="script.js"></script>
    <h1>Hello World</h1>
ianmorris (0)

@LynnOng That will work as an work around, but I wanted to use a single stylesheet with several files.