JavaScript Express Basics Serving Static Files in Express Merging the Design Files

Nelson Polanco
Nelson Polanco
5,887 Points

All the styles are loaded but all the images and styles are all over the place and on top of each other on the web page.

I've been following along with the video and I can see the styles and images on the page, but everything is scattered and on top of each other. The javascript works fine but the css is all over the place. can anyone help?

Also, there is a "js" folder in the video and I don't have that "js" folder which I'm not sure if it's important or not so that might be the problem but im not sure. I do have the style.css file and all the images.

That's all I have so I'm not sure what the problem is.

Reggie Williams
seal-mask
.a{fill-rule:evenodd;}techdegree
Reggie Williams
Treehouse Teacher

Hey Nelson Polanco have you double-checked that the project file folder you are in matches the stage you are on?

Nelson Polanco
Nelson Polanco
5,887 Points

Yes I did, Reggie Williams. I'm on the last video of the express course. As I said above, the CSS works except for the fact that the containers and words are all over the place and the images aren't loading. I'm not sure what's wrong.

2 Answers

Reggie Williams
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Reggie Williams
Treehouse Teacher

Hey Nelson Polanco it sounds like this may be an issue with the pug files. With pug, it's easy to change the file structure unintentionally with indentation. Are you able to share your project or compare your code to that included in the project downloads?

Nelson Polanco
Nelson Polanco
5,887 Points

That did the trick! I fixed my pug files and almost everything looked right except I realized that the style.css file that I downloaded from the designer section in the teachers notes had a block of code that was incorrect so I used the style.css file from the project downloads and that finished up solving the issues. Thank you so much for helping with this and saving me hours of scratching my head.

Reggie Williams
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Reggie Williams
Treehouse Teacher

Nelson Polanco you're very welcome! I remember having this same issue come up while learning pug, it's very common but once you've done it you'll be able to spot it if it happens again