bigbenbuilders Posted September 1, 2009 Share Posted September 1, 2009 Hey guys if I had a menu php includes file to call a top menu as the example below. The problem is that the background color changes from page to page and the tab for the page they are on changes. Is there a way to do this with one php file? would it be like an ob_start(); and if so Im not sure how to do it? Thanks for the help. <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="32" height="20"> </td> <td width="112"><a href="index.php" class="a_black text_10"> <div class="tab_1_index" onMouseOver="this.className='tab_1_on_index'" onMouseOut="this.className='tab_1_index'">alumni</div> </a></td> <td width="105"><a href="index.php?option=com_content&task=category§ionid=1&id=1&Itemid=37" class="a_black text_10"> <div class="tab_1" onMouseOver="this.className='tab_1_on'" onMouseOut="this.className='tab_1'">giving</div> </a></td> <td width="105"><a href="/content/Kreft_Arts/KreftArts" class="a_black text_10"> <div class="tab_1" onMouseOver="this.className='tab_1_on'" onMouseOut="this.className='tab_1'">kreft arts</div> </a></td> <td width="105"><a href="/content/Library/Library" class="a_black text_10"> <div class="tab_1" onMouseOver="this.className='tab_1_on'" onMouseOut="this.className='tab_1'">library</div> </a></td> <td width="182"><a href="/content/GraduateStudies" class="a_black text_10"> <div class="tab_1" onMouseOver="this.className='tab_1_on'" onMouseOut="this.className='tab_1'">graduate studies</div> </a></td> <td width="19"> </td> </tr> </table> Link to comment https://forums.phpfreaks.com/topic/172727-php-includes/ Share on other sites More sharing options...
ignace Posted September 1, 2009 Share Posted September 1, 2009 This is more a CSS thing then a PHP thing: <body id="page1"> #page1 { background-color: #FF22FF } #page1 .someClass { background-color: #22FFFF } #page2 { background-color: #FFFF22 } #page2 .someClass { background-color: #2F2F2F } The menu itself: #homepage { background-color: #F2F2F2 } #contact { background-color: #F22FF2 } .. Link to comment https://forums.phpfreaks.com/topic/172727-php-includes/#findComment-910454 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.