Ask coding questions

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

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 (1885) [earned 5 cycles]
View Answer
Comments
hotnewtop
JBloves27 (1885)

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 (2766)

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

ANDREWVOSS (187)

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

VulcanWM (2766)

The code isn’t working tho @ANDREWVOSS

ANDREWVOSS (187)

@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 :/