CSS doesn't recognize first entry

Hello!

I’ve run into an issue with CSS where it won’t recognize whatever my first entry is after <style>. I end up having to add in something like this at the very top just to fool the code:

#x {
 //ignore this
}

Here is a mock pen to see it in action: https://codepen.io/JesseHope/pen/XvXyEG

I’m sure it’s something dumb but it’s got me confuzzled. Any ideas?
-J

1 Like

Sure - in codepen, don’t include the style tags in the CSS pane. It’s already assuming it will be in a stylesheet, so codepen handles that for you.

Remove the <style> and </style>, should be good to go.

Same can be said for the HTML pane - don’t worry about the

<!DOCTYPE html>
<head>
...
</head>
<body>

or the closing

</body>
</html>

The HTML will auto-populate the body element of the generated page.

Too simple =)

Thank you!

No worries, common gotcha. Glad it worked out. :wink: