#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    Athens, GA
    Posts
    1
    Rep Power
    0

    frames w/o frames?


    Hello all! I'm designing a page for a local rock band. I've got the layout how I want it with a pic of the band as a background and a nav bar, etc. I have the elements layed out in CSS as I want them. Everything's great. Buuut...I want to have it so the page behaves like a page with frames (i.e., clicking on the link opens the data in another section of the same window instead of opening another page entirely.)

    So, is there any way to either:

    1) set up a page to seem like it's emulating frames without actually using frames (seems like a dumb question, I know...)

    OR

    2) establish a shared background in the frames themselves (to preserve the background as one entire piece...without cutting up the current page so the html in each frame is seamless...seems like kind of a pain that way)

    Thanks!
  2. #2
  3. I'm New Here.
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    UK
    Posts
    6,686
    Rep Power
    424
    use tables...

    load the top part of the page in header.php, the footer in footer.php and just include the two in any file
  4. #3
  5. 11
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jul 2001
    Location
    Lynn, MA
    Posts
    4,635
    Rep Power
    86
    One VERY nice solution is to use SSI to include the common navigation elements on all your pages- this can help you get "frames without frames" as you're referring to it.

    For example:
    header.shtml
    Code:
    <html>
        <head><title>foo</title></head>
        <body>
          <table width="100%">
    	<tr>
    	  <td colspan=2>My Header</td>
    	</tr>
    	<tr>
    	  <td width="100">
    	    <ul>
    	      <li>Navigation Element 1</li>
    	      <li>Navigation Element 2</li>
    	      <li>Navigation Element 3<br/>
    		  <ul>
    		    <li>Sub navigation 1</li>
    		    <li>Sub navigation 2</li>
    		    <li>Sub navigation 3</li>
    		  </ul>
    	      </li>
    	      <li>Navigation Element 4</li>
    	    </ul>
    	  </td>
    	  <td>
    	    <!-- Content begins here -->
    footer.shtml
    Code:
    	    <!-- Content ends here -->
    	  </td>
    	</tr>
          </table>
        </body>
      </html>
    And then in your actual pages:
    Code:
    	   <!--#include virtual="/header.shtml" -->
    	    <p>Welcome to our band site!</p>
    	   <!--#include virtual="/footer.shtml" -->
    The SSI syntax is probably wrong (I don't use it that much) but the theory is sound. As long as your content pages are "standalone" HTML, you'll have them wrapped in your common header/footer which you can design however you like. This would kind of be a simpler to manage version of option 1.

    HTH. And if the pages are static, there is absolutely no reason to use a scripting language like PHP to stitch them together, unless you want to use more server resources and/or know it already. Right tool, right job, you know.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    #devshed @ irc2.beyondirc.net
    Posts
    231
    Rep Power
    16
    I agree, SSI is the way to go. The syntax is correct, considering those to files are in the root public directory (www.domain.com/header.shtml). Although, they can be just regular HTML files.
    .

IMN logo majestic logo threadwatch logo seochat tools logo