Skip to content

Codepen to Github CSS not applying #23734

Answered by Gisgar3
nac0512 asked this question in General
Discussion options

You must be logged in to vote

Hey, welcome to the GitHub Support Community! The reason your CSS is not displaying properly is because your CSS stylesheet is not specified in the head element of your HTML file. This works on CodePen because CodePen automatically links your CSS and JavaScript to the HTML code on their site.

To fix this issue and make your CSS stylesheet work on your GitHub Pages site, place the following block of code after the <!DOCTYPE html> line in your HTML file:

<head>
    <link rel="stylesheet" href="style.css">
</head>

Hope this fixes your issue! If it doesn’t work please let me know, if it does then mark this reply as a solution!

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants