Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP Included Section

    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.

    Example:

    "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?

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,662
    Thanks
    6
    Thanked 1,006 Times in 979 Posts
    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).


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •