I've got a basic PHP script embedded in a html document. I've also got an external style sheet. When I view the page, the CSS has an effect on the entirety of the page, except on an echo statement. When I test the page with some html text, the CSS works on that, yet it doesn't work when printing the variable.
This is the html/php:
<div id ="date">
test
<?php
echo "$newDate";
?>
</div>
This is the CSS for "date":
#date {
color:#ff0000;
}
As I said, the CSS works for the rest of the page, and works when showing "test", as shown below:
The date "2016-03-15 15:43:40" should also be in red and centered, so why does this not work? Thanks
EDIT: I've got other classes in my CSS (is that the right word?) that format the area outside of this. Could this be affecting my date div tag? Also can I say thanks to all you guys, you're life savers to a beginner like me!