PHP Include Files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gemispence
Forum Newbie
Posts: 2
Joined: Sun Jan 20, 2008 10:23 pm

PHP Include Files

Post by gemispence »

Hello All - I have 3 include files that I'm using for each page on my web site, a header, a menu bar, and a footer. Everything is working fine except that I'm also using css styles and every page is inheriting the styles from my inclue files. For instance, if I want one page to have different styles, I created inline styles in the page, but it's overridden by the styles from my include files. Can someone please help?? :? Thanks in advance.

spencer
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: PHP Include Files

Post by Christopher »

Give the styles that you want overridden the same names and the styles that you want unique on each page names different than the ones in the global stylesheet.
(#10850)
gemispence
Forum Newbie
Posts: 2
Joined: Sun Jan 20, 2008 10:23 pm

Re: PHP Include Files

Post by gemispence »

Thanks very much Christopher. The problem is that the page that I want the hyperlinks (index) is still inheriting the inline hyperlink style from the menu include, even though I specified it to use an external stylesheet (<link type="text/css" rel="stylesheet" href="style_home.css">).
Post Reply