Ask coding questions

← Back to all posts
Why is expand.css and expand.js not working?
h
VulcanWM

Why is expand.css and expand.js not working?
I used this code in my other project: Drinks Cabin, and it worked perfectly.
Can somebody help me?
Thanks

Answered by JBloves27 [earned 5 cycles]
View Answer
Voters
VulcanWM
Comments
hotnewtop
JBloves27

Uh, a few errors in your code, the <script> should be in the <body>, not in <head>. That might be one of your errors. Next, the error could be that the css doesn't do anything because the css rules don't affect the html markup, meaning you don't have anything in the js file that affects the markup, which makes the css not do anything.

Hope this helps!

VulcanWM

ah it's the body thing, so it works now! ty! @JBloves27

JBloves27

No Problem! :) @VulcanWM

ANDREWVOSS

200 is the HTTP code for success, not an error.

VulcanWM

The code isn’t working tho @ANDREWVOSS

ANDREWVOSS

@VulcanWM I think the problem is with the CSS and JS, but I'm not good with frontend, so I won't be of much help :/