Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP

CRUD operations with PHP - Downloaded project files do not have functional CSS

Hey all,

I downloaded the project files for CRUD operations in PHP, and when I loaded them into my mamp server, the homepage is styled incorrectly. Logos take up the entire span of the page, things appear generally broken. What do I do?

2 Answers

Hi Erik. I'm not sure if you resolved the issue yet, but I would make sure any previous project files are closed. My cohort had the same issue when she was showing me her project. Her browser "saved" her previous project that was interfering with the styles of the current one. Clear cache and it should be ok. Also when I set the document root for Mamp, I route to the direct project folder and not the parent folder. I downloaded the Crud project files, it's ok on my end. Hope this helps.

Thanks for getting back to me Joy.

I ended up using workspaces to do that particular module, but your comment might have illuminated something for me that I want to clarify.

If I understand you correctly, its possible that my browser cached a 'styles.css' file from a previous lesson and was using that to style the new project, despite there being a shiny new 'styles.css' file included in the project directories? Is that correct?

Because if so, that would explain all the odd behaviors in my troubleshooting, including styles not changing when I edit or entirely delete them.

I would guess, if this is the problem, it was caused by similar file naming conventions between separate projects? Is that also correct?

Thanks for your help.

Yes, sounds like you figured out the mystery. I too use wkspaces when all else fails, but yes in the real world environment using your own IDE is the go to. On my c drive I created a parent folder. Within that folder I have the integrating php w/db project in folder 1. Crud project in folder 2. I root mamp directly to the specific folder. For Crud i direct mamp to folder 2.