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 Enhancing a Simple PHP Application Integrating Validation Errors Displaying the Error Message

Stephen Little
Stephen Little
8,312 Points

The CSS style for the error is not working in firefox? anybody know why?

I have the new CSS file and it will display proper in google chrome but I don't get the orange box in firefox just the text.

Any idea why?

Stephen Little
Stephen Little
8,312 Points

Really funny I used the developer tools and found that it was calling the .section .p style. I went and found the style it should be and changed it some to see what I could do. I then returned it back to the way it was and for some reason it is working now. I have no idea why, if anybody has a comment on this I would be interested in hearing it for sure.

Cheers! Stephen

2 Answers

Walter Allen
Walter Allen
iOS Development with Swift Techdegree Student 16,023 Points

I figured it out. I had this problem too. It's because your browser had the old stylesheet cached, and it was using that cached css file which did not have the new styling in it. Once I emptied my cache and reloaded my page, it worked fine.

Jason Brady
Jason Brady
17,372 Points

First... if you download the updated project files, there is a new .css stylesheet that should be uploaded. This includes the style for the error message.

Second, the error message displayed on screen should be:

     echo '<p class="message">'.$error_message.'</p>';

so you can target .message much more effectively.

Here is the markup in the new css file:

.page p.message {
    background: #ffeca4;
    border: 1px solid #f16702;
    padding: 1em;
    width: 344px;