I am dividing my website in the typical php include way. If I want the includes to use their own stylesheet how is this done? For example if I have include “header.php”, how can I make it so that a stylesheet only applies to this include?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do this either by including a different stylesheet to begin with, or by giving your
<body>element anidorclassattribute that enables you to write selectors such asThe first approach plugs in at the
<head>tag render code, the second does so at the<body>tag render code. You need to write your code such that one of these places also knows which PHP script you intend to include (or have already included).