-
I’m having trouble getting my CSS from Codepen to apply to my Github Pages. I’m fairly new, but have looked at a TON of google searches and nothing seems to be helping. This is what I have in my style.css
This is what is returned. https://nac0512.github.io/test2/ I’ve tried it both with and without the html tag. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
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 To fix this issue and make your CSS stylesheet work on your GitHub Pages site, place the following block of code after the
Hope this fixes your issue! If it doesn’t work please let me know, if it does then mark this reply as a solution! |
Beta Was this translation helpful? Give feedback.
-
It worked, perfect! Thank you. For future reference, do I just have to put that at the beginning of every project I import? |
Beta Was this translation helpful? Give feedback.
-
For every project you import from CodePen, you’ll need to add that entire |
Beta Was this translation helpful? Give feedback.
-
Got it. Thanks so much. |
Beta Was this translation helpful? Give feedback.
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:Hope this fixes your issue! If it doesn’t work please let me know, if it does then mark this reply as a solution!