Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
1

CSS not linking

TheDNAHero
TheDNAHero

I have been trying to edit a div in css, yet It does not seem to want to connect to the stylesheet. I have determined it is css's problem because even when I include the styles into the main html page it still doesn't work. Is this just replit being replit?

1 year ago
Answered by ch1ck3nView Answer

Voters

Comments

TopNew
1
ch1ck3n
ch1ck3n

Well the body has no width nor height so 100% is just 0px

this is the correct CSS:

#game{ width:100%; height:100%; position: relative; background-color: red; } body{ width: 100vw; height: 100vh; margin:0px; }
1 year ago
1
MrVoo
MrVoo

Which repl? You linked an empty one .-.

1 year ago
Load more