Using CSS with my PHP page

Hi All…

Im trying to get my navigation bar positioned correctly but it doesnt seem to work. I have my php code
[php] <?php include("includes/sidebar.php"); ?>[/php] which calls the side bar php page
[php]

Navigation

  • Home
  • [/php]

    What do I need to do so I can get this page managed by the css sheet?

    Thanks

What I know is if it works with plain HTML it should work with PHP. PHP is just a type of HTML where the code is edited by a server or computer before your browser displays it, and assuming that your sidebar works in plain html it should work here.

What does sidebar.php include? You need to be more specific. If you wanted to have the page managed by css style sheet, as always it’s exactly the same as html:

Great thanks, that clicked as soon as you said it. I was just a little confused how my pages were getting thier styles from the CSS when there wasnt a link. Ive added the code and now its working - thanks.

Now I know I don’t understand completely what you are doing, but instead of putting sidebar.php into every page, why not just use an html frameset? Works great with sidebars if you don’t mind learning a bit of javascript so you can communicate with other windows.

I think I’ll stick with it as is for now. Im trying to learn php and mysql so to throw js in there would cause my head to explode :slight_smile:

Ok that’s fine. As for me, I know html, javascript, php but almost no css. Luckily css is easy to just look up what you are looking for usually.

Sponsor our Newsletter | Privacy Policy | Terms of Service