Align help for two seperate php files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tom

    Align help for two seperate php files


    <?php

    include 'c:\usr\apache\ httpd\html\my\n avi.php';
    include 'c:\usr\apache\ httpd\html\my\i ndex.php';

    ?>

    thats my current code, the problem is that the first include line needs
    to be align in a specific area. the navi.php is my navigation page and
    im tring to align it to a specific area. the index is the regular page
    and doesn't need anything done.
    anyone of your pro's know what im lacking?

  • Dani CS

    #2
    Re: Align help for two seperate php files

    tom wrote:[color=blue]
    > <?php
    >
    > include 'c:\usr\apache\ httpd\html\my\n avi.php';
    > include 'c:\usr\apache\ httpd\html\my\i ndex.php';
    >
    > ?>
    >
    > thats my current code, the problem is that the first include line needs
    > to be align in a specific area. the navi.php is my navigation page and
    > im tring to align it to a specific area. the index is the regular page
    > and doesn't need anything done.
    > anyone of your pro's know what im lacking?
    >[/color]

    Two possibilites come to my mind:

    1.- Make the navigation area place itself at an absolute position on
    your webpage. See the 'position' and 'display' properties of CSS
    stylesheet (nothing to do with PHP here).

    2.- Do the include of navi.php _inside_ your index.php, at the exact
    place of your webpage where you want to place the navigation area:

    ***file: index.php***

    <html>
    <head><title>.. .</title></head>

    <body>

    <div id="navigation" ><?php include("/path/to/navi.php"); ?></div>

    <div id="main">Your main content.</div>

    </body>
    </html>

    Comment

    • Pedro Graca

      #3
      Re: Align help for two seperate php files

      tom wrote:[color=blue]
      > <?php[/color]

      echo '<div class="navi">';
      [color=blue]
      > include 'c:\usr\apache\ httpd\html\my\n avi.php';[/color]

      echo '</div>';
      [color=blue]
      > include 'c:\usr\apache\ httpd\html\my\i ndex.php';
      >
      > ?>
      >
      > thats my current code, the problem is that the first include line needs
      > to be align in a specific area. the navi.php is my navigation page and
      > im tring to align it to a specific area. the index is the regular page
      > and doesn't need anything done.
      > anyone of your pro's know what im lacking?[/color]

      Now just define the class "navi" in your CSS file (or as a inline style)
      as you like it.


      I don't know CSS and I didn't test the specification below, it may
      (probably will) not do what it appears (to me) it should do:

      div.navi {
      position: absolute;
      left: 0;
      top: 0;
      width: 134px;
      float: left;
      }

      --
      Mail to my "From:" address is readable by all at http://www.dodgeit.com/
      == ** ## !! ------------------------------------------------ !! ## ** ==
      TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
      may bypass my spam filter. If it does, I may reply from another address!

      Comment

      • tom

        #4
        Re: Align help for two seperate php files

        THANKS GUYS, I didn't it consider CSS being an opition. I'm new and
        this still looks like a foriegn language to me. Everything works fine
        and thanks for the help once more.

        code is here,

        <html>
        <head>
        <title>Member s Page</title>
        <style type="text/css">
        h1
        {
        position: absolute;
        top: 100px;
        left: 1px
        width: 1px
        }
        </style>

        </head>

        <body>
        <h1><?php include('\navi. php');</h1>
        <div id="main">
        <?php include('\index .php'); ?></div>


        </body>
        </html>

        Comment

        • tom

          #5
          Re: Align help for two seperate php files

          THANKS GUYS, I didn't it consider CSS being an opition. I'm new and
          this still looks like a foriegn language to me. Everything works fine
          and thanks for the help once more.

          code is here,

          <html>
          <head>
          <title>Member s Page</title>
          <style type="text/css">
          h1
          {
          position: absolute;
          top: 100px;
          left: 1px
          width: 1px
          }
          </style>

          </head>

          <body>
          <h1><?php include('\navi. php');</h1>
          <div id="main">
          <?php include('\index .php'); ?></div>


          </body>
          </html>

          Comment

          Working...