PHP problem, or is the CSS at fault?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fructose
    New Member
    • Sep 2006
    • 8

    PHP problem, or is the CSS at fault?

    This is driving me crazy... I've spent, literally, a week trying to solve this (probably very silly) problem – to no avail. Help please!

    The code below shows the PHP with the relevant CSS for structuring the left and right columns of a standard 3-column fluid layout. The problem is that the left column is simply not appearing. Any theories will be received with eternal gratitude; any solutions – with a million dollar cash award (as soon as I become a billionaire, that is).

    MY PHP:

    <!-- LEFT COLUMN -->

    <?php

    $highclcwidth = "<div id=\"lchighc\" class=\"column\ ">";
    $nonhighclcwidt h = "<div id=\"lcnonhighc \" class=\"column\ ">";

    if ($page == "high c") {echo $highclcwidth;}
    else {echo $nonhighclcwidt h;}

    ?>

    <?php
    include ("phpinserts/iilc-text.php");
    ?>

    </div>

    <!-- END LEFT COLUMN -->



    MY CSS:

    #container .column {
    position: relative;
    float: left;
    padding-bottom: 20010px;
    margin-bottom: -20000px;
    }

    #lchighc {
    width: 134px;
    padding: 0 10px;
    right: 230px;
    margin-left: -100%;
    margin-top: 507px;
    z-index: -2; top: 202px;
    background-color: #efdfff; border-right: 1px solid #000000;
    }

    #lcnonhighc {
    width: 134px;
    padding: 0 10px;
    right: 230px;
    margin-left: -100%;
    margin-top: 507px;
    z-index: -2; top: 202px;
    background-color: #efdfff; border-right: 1px solid #000000;
    }



    The mystery is that the right column works fine, despite having no substantial code differences. Here it is for comparison:


    My PHP:

    <!-- RIGHT COLUMN -->

    <?php

    $highcrcwidth = "<div id=\"rightcolum nhighc\" class=\"column\ ">";
    $nonhighcrcwidt h = "<div id=\"rightcolum nnonhighc\" class=\"column\ ">";

    if ($page == "high c") {echo $highcrcwidth;}
    else {echo $nonhighcrcwidt h;}

    ?>


    <img src="images/ software-box-big.jpg" alt="Link to this site" class="adformat "/>
    <img src="images/ order2.jpg" alt="Link to this site" class="adformat "/>


    <p>
    Current date + time:
    <?php
    echo date( "F d Y h:i:s", getlastmod() );
    ?>
    </p>

    </div>

    <!-- END RIGHT COLUMN -->


    My CSS:

    #rightcolumnhig hc {
    width: 162px;
    padding: 0 10px;
    margin-right: -229px;
    z-index: 3; top: 160px;
    background-color: #efdfff; border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: solid #000000;
    }

    #rightcolumnnon highc {
    width: 162px;
    padding: 0 10px;
    margin-right: -229px;
    z-index: 3; top: 160px;
    background-color: #efdfff; border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: solid #000000;
    }



    Thanks,
    Matheson
  • TheMadMidget
    New Member
    • Oct 2006
    • 98

    #2
    What's in phpinserts/iilc-text.php?

    Comment

    • fructose
      New Member
      • Sep 2006
      • 8

      #3
      only text for the left column ("lc") - nothing else whatsoever

      Comment

      • moishy
        New Member
        • Oct 2006
        • 104

        #4
        Just a little off the subject:

        I see you use the "cancel quote":

        $str = "somthing \"with\" a quote";

        However, more siple and more correct:

        $str = 'somthing "with" a quote';

        Notice how I changed quote types from double quote to single.

        Comment

        • scriptee
          New Member
          • Nov 2006
          • 17

          #5
          Originally posted by fructose
          This is driving me crazy... I've spent, literally, a week trying to solve this (probably very silly) problem – to no avail. Help please!

          The code below shows the PHP with the relevant CSS for structuring the left and right columns of a standard 3-column fluid layout. The problem is that the left column is simply not appearing. Any theories will be received with eternal gratitude; any solutions – with a million dollar cash award (as soon as I become a billionaire, that is).

          MY PHP:

          <!-- LEFT COLUMN -->

          <?php

          $highclcwidth = "<div id=\"lchighc\" class=\"column\ ">";
          $nonhighclcwidt h = "<div id=\"lcnonhighc \" class=\"column\ ">";

          if ($page == "high c") {echo $highclcwidth;}
          else {echo $nonhighclcwidt h;}

          ?>

          <?php
          include ("phpinserts/iilc-text.php");
          ?>

          </div>

          <!-- END LEFT COLUMN -->



          MY CSS:

          #container .column {
          position: relative;
          float: left;
          padding-bottom: 20010px;
          margin-bottom: -20000px;
          }

          #lchighc {
          width: 134px;
          padding: 0 10px;
          right: 230px;
          margin-left: -100%;
          margin-top: 507px;
          z-index: -2; top: 202px;
          background-color: #efdfff; border-right: 1px solid #000000;
          }

          #lcnonhighc {
          width: 134px;
          padding: 0 10px;
          right: 230px;
          margin-left: -100%;
          margin-top: 507px;
          z-index: -2; top: 202px;
          background-color: #efdfff; border-right: 1px solid #000000;
          }



          The mystery is that the right column works fine, despite having no substantial code differences. Here it is for comparison:


          My PHP:

          <!-- RIGHT COLUMN -->

          <?php

          $highcrcwidth = "<div id=\"rightcolum nhighc\" class=\"column\ ">";
          $nonhighcrcwidt h = "<div id=\"rightcolum nnonhighc\" class=\"column\ ">";

          if ($page == "high c") {echo $highcrcwidth;}
          else {echo $nonhighcrcwidt h;}

          ?>


          <img src="images/ software-box-big.jpg" alt="Link to this site" class="adformat "/>
          <img src="images/ order2.jpg" alt="Link to this site" class="adformat "/>


          <p>
          Current date + time:
          <?php
          echo date( "F d Y h:i:s", getlastmod() );
          ?>
          </p>

          </div>

          <!-- END RIGHT COLUMN -->


          My CSS:

          #rightcolumnhig hc {
          width: 162px;
          padding: 0 10px;
          margin-right: -229px;
          z-index: 3; top: 160px;
          background-color: #efdfff; border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: solid #000000;
          }

          #rightcolumnnon highc {
          width: 162px;
          padding: 0 10px;
          margin-right: -229px;
          z-index: 3; top: 160px;
          background-color: #efdfff; border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: solid #000000;
          }



          Thanks,
          Matheson
          Hi !
          Why do you have ...

          "margin-left: -100%;"

          in both "lchighc" and "lcnonhighc " ?

          I think , if you change that "%" to "px" it will work.
          Good Luck !

          Comment

          • ronverdonk
            Recognized Expert Specialist
            • Jul 2006
            • 4259

            #6
            It is time you guys read the Posting Guidelines for this forum!!
            NEXT TIME ENCLOSE YOUR CODE WITHIN PHP, CODE OR HTML TAGS!! READ THE POSTING GUIDLINES BEFORE POSTING ANYTHING IN THIS FORUM! -

            Ronald :cool:

            Comment

            Working...