Jump to content

php includes


bigbenbuilders

Recommended Posts

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&sectionid=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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.