View Full Version : PHP Included Section

07-22-2011, 05:22 AM
I have a simple site set up, and I want to know how I can use the main CSS for my site to change the background of the php included file.


"index.php" has several sections, one of which is a navigation menu, named "menu.php"; it is included on the main page (index.php) via PHP Include function.

The background for this part of the site, is grey. How can I force the Main CSS to change that background as well?

07-22-2011, 08:13 AM
Look at your output source code. The included section is a regular part of your website now and can be styled in your main stylesheet with all the usual CSS selectors. In fact, if you don’t have styled it anywhere there’s no reason why the included section should look any different unless you’ve included more than just the menu (like, for example, another head section with stylesheets and what not).