4 Replies Latest reply on Jun 3, 2010 1:11 PM by John Waller

    Confusion with PHP and CSS file

    Deaf Mike Level 1

      I'm used to working in DW and with CSS and HTML.  A company designed a site for us and used PHP.  So I've opened the page in question in DW4.  I made some minor changes to it.  Here it is:

       

      http://pscharities.org/matt-boobie.php

       

      What I cannot figure out is, if you look at the page live, at the upper right where the dark blue navigation boxes are HOME WHO WE ARE and so on, I need to change the above page so the dark blue surrounds EVENTS not WHO WE ARE.  I can't seem to figure out how to do this though.

       

      Can someone help me?

       

      Thanks - the Deaf Guy

        • 1. Re: Confusion with PHP and CSS file
          John Waller Adobe Community Professional & MVP

          The class nameed active in the code on that page needs to be applied to the Events link instead of the Who We Are link:

           

           

          <ul id="nav">
               <li><a href="index.php" class="home">Home</a></li>
               <li><a href="who-we-are.php" class="whoweare active">Who We Are</a></li>
               <li><a href="who-we-help.php" class="help">Who We Help</a></li>
               <li><a href="events.php" class="events active">Events</a></li>
               <li><a href="contact.php" class="contact">Contact</a></li>
              </ul>

           

          How is this nav bar created? Server side include? or Library Item? or some other means?

          • 2. Re: Confusion with PHP and CSS file
            Deaf Mike Level 1

            It's a SSI with a file inside called masthead.php.  I opened that file and it looks like they are all active:

             

            <div id="masthead">

            <a href="index.php" class="logo">Professionals Supporting Charities</a>

            <ul id="nav">

            <li><a href="index.php" class="home<?php if($pageID == 1){echo ' active';}?>">Home</a></li>

            <li><a href="who-we-are.php" class="whoweare<?php if($pageID == 2){echo ' active';}?>">Who We Are</a></li>

            <li><a href="who-we-help.php" class="help<?php if($pageID == 3){echo ' active';}?>">Who We Help</a></li>

            <li><a href="events.php" class="events<?php if($pageID == 4){echo ' active';}?>">Events</a></li>

            <li><a href="contact.php" class="contact<?php if($pageID == 5){echo ' active';}?>">Contact</a></li>

            </ul>

            </div><!-- End #masthead -->

            <div class="clear"></div>

             

            So I'm not sure where you got the code in your previous post because the only place I see that code is in the SSI/PHP file - unless I'm looking in the wrong place?

            • 3. Re: Confusion with PHP and CSS file
              Deaf Mike Level 1

              I figured it out.  When I went into the masthead.php file, I noticed the $page ID codes for each nav button.

               

              Then I opened up the events page next to the who we are page. At the very top of each page, in the code view, it had:

               

              $pageID = 4; (for events tab)

               

              and

               

              $pageID = 2; (for who we are tab)

               

              That was the Pandora's box - I simply went into the page that needed the fix, changed the number that matched the ID tab, and it worked.

              • 4. Re: Confusion with PHP and CSS file
                John Waller Adobe Community Professional & MVP
                function(){return A.apply(null,[this].concat($A(arguments)))}

                So I'm not sure where you got the code in your previous post because the only place I see that code is in the SSI/PHP file - unless I'm looking in the wrong place?


                Finished code (after the server has processed the PHP) via View Source in IE.

                 

                The next thing I would have asked for was the original PHP file but I'm glad you've got it sorted.

                 

                Thanks for the feedback.