Codepen Bug? Style is ignoring my first element rules

Hello, I was just about to finish my first certification project (The Tribute Page) and for some reason, it’s ignoring the styling rules I put in for “body”. This happens to whatever I put in first, codepen just ignores it. If I copy and paste the exact thing on VSC, the page comes out as intended. The only “solution” I can find for codepen is adding a filler id at the top that doesn’t do anything.

Link: https://codepen.io/ecoreck/full/NWXWjYd

If I do

<style>
  filler {}
  body {
      background-color: rgb(226,242,255);
      text-align: center;
      font-family: Verdana, Sans-serif;
    }

Then the page is just fine. If I remove the filler, then everything becomes unformatted.

It looks like the <body> CSS is working now.

It might be best to transfer the info that you have in the <style> section, and place it in the CSS panel.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.