SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast am_dorky's Avatar
    Join Date
    Sep 2008
    Location
    Bucks
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question linking pages .html .shtml

    Hi Guys,

    Wasn't too sure where to put this post. I am creating a site and I have a column on the left with site news. I want this page to be displayed on every page of my site. How would I go about this?

    This is the way I thought it should be done which works in IE but not firefox. I have a page named homepage.shtml. I have a link on this page
    <!--#include file="news.inc" --> and then I have a file called news.inc that has all the news info.

    Am I going about this wrong? Some advice asap would be great as it is quite urgent.

    Many Thanks

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2008
    Location
    Santa Barbara, CA
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well on the files that I have on every page I have used code like this

    <?php include("../include/bc2.php") ?>

    This seems to display properly in IE and Firefox. The shorthand is bc=bottomchunk
    and I made a new file so
    2=the second generation

    I keep this file in the main directory in in folder label include.

    I hope this helps

  3. #3
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by am_dorky
    Am I going about this wrong? Some advice asap would be great as it is quite urgent.
    You are doing it right, and the file should be in the same directory. You can not go up to parent directory with the file command, you can only stay in directory go further into next folder(s).

    The inc-file should be exactly the code that should be written into the page.
    Happy ADD/ADHD with Asperger's

  4. #4
    SitePoint Enthusiast am_dorky's Avatar
    Join Date
    Sep 2008
    Location
    Bucks
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question

    Sorry, I should have been clear with what is happening in firefox. IE is fine but when I open index.shtml in firefox all the design of the site is not showing. Just the the content of the pages.

    Anyone what might be causing this?

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by am_dorky View Post
    Sorry, I should have been clear with what is happening in firefox. IE is fine but when I open index.shtml in firefox all the design of the site is not showing. Just the the content of the pages.

    Anyone what might be causing this?
    You haven't posted any information related to the cause of why your page looks different in different browsers. The info you have posted is completely unrelated to the problem. Whether a page uses SSI or not will not affect the way the page looks in any way since the same HTML is delivered to the browser either way.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •