Jump to content

CSS and PHP includes


akomaz

Recommended Posts

What is the standard for using css styling within a php include script?  Say you have a main page that calls a php script from an include command...is it recommended to keep all css files linked from within the main page and have strictly php used in the script code, or is it of little consequence where the styling is linked from?  This is assuming the styling is only used for that particular portion of the page that is associated with the include content.

Link to comment
Share on other sites

It doesn't matter how you do it as long as the CSS is between your head tags. CSS and PHP are completely different things that do not interact with each other at all. CSS interacts with the output of a PHP script (if the script outputs (X)HTML). So it doesn't matter where the CSS is in your PHP, as long as the result is a properly formed HTML document, and to have a properly formed HTML document, you need to have the CSS between the head tags.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.