Quote:
Originally Posted by Pash
You should be applying style markuping in a separate CSS file, rather than inline with <div style="ladeda"> as you seem to be suggesting.
That said, there is no reason for anything not to work with PHP - just make sure you are properly escaping your ' and "s with a \.
|
Not should but can. If you know anything about CSS you will know that there are very good reasons for inline CSS. It's very specific, which means it'll override pretty much anything else (though I think !important may be able to override it). An internal stylesheet (contained in the header) is the next level up, while external stylesheets, which are meant to be shared between several pages, and therefore shouldn't be used if only one page is using it, rather use internal, are on the lowest end. So say you have in an external stylesheet body{background:#000000;}, which is used on pages A, B, and C. Pages A and B though both have internal stylesheets which have body {background:#FFFFFF;} and page A has style="background:#A0A0A0;" on its body tag. Page A would have the gray background (#A0A0A0), page B would have white (#FFFFFF) and page C would have black (#000000). PHP works with all three methods just like any HTML does.
__________________
PHP Code:
<?php echo "Hello World"; ?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
|