php cannot see my html css
Posted: Sat May 16, 2009 7:25 pm
I would like to echo the following giving it a CSS style:
echo '<p class="mypstyle">this is a test</p>';
but the output is plain text without any style.
Now if i was to break out of php instead and in the same location and enter:
<p class="mypstyle">this is a test</p>
then the output is styled correctly.
So my question is why doesnt php see my css?
The only way i've gotten the echo to output the above html correctly is if i include this in my php file:
echo '<head><style type="text/css">' . include('mycss.css') . '</style></head>';
Is this my only option?... any help would be greatly appreciated...
echo '<p class="mypstyle">this is a test</p>';
but the output is plain text without any style.
Now if i was to break out of php instead and in the same location and enter:
<p class="mypstyle">this is a test</p>
then the output is styled correctly.
So my question is why doesnt php see my css?
The only way i've gotten the echo to output the above html correctly is if i include this in my php file:
echo '<head><style type="text/css">' . include('mycss.css') . '</style></head>';
Is this my only option?... any help would be greatly appreciated...