Loading ...
Sorry, an error occurred while loading the content.

6971Re: [NH] Use Of target="_blank"

Expand Messages
  • Axel Berger
    Mar 26, 2011
    • 0 Attachment
      Ray Shapp wrote:
      > if it will keep my nav bar in view as the user opens various
      > pages on our site,

      Several questions here, I'll try to keep some logic in the answer. With
      frames you have different parts of the window in different files and
      moing around on your own site normally involves just changing one frame.
      I won't repeat the disadvantges, the big advantage was, that it made
      writing the site quite easy. Without frames each complete page is one
      HTML-file. You have to include the menu in each and every one of them
      and what's worse, you have to aplly all changes to all the files. A
      nightmare. So what you do instead looks like this:

      <DIV ID="left">
      <!--#include virtual="/base/navigation.htm" -->
      </DIV> <!-- end #left -->

      The #include virtual is a command for the server software to drop the
      contents of navigation.htm here and serve that as HTML to the visitor.
      You need a hoster that offers SSI. Not all do and those often only with
      "premium" accounts. Another problem is, you can't just view those pages
      locally before uploading. You need to run Apache on your own computer
      for that and then call http://localhost/. So it definitely is more
      hassle than simple frames, or at least it is the first time.

      Leave the script for later, it is just a bit of icing on the cake. In my
      CSS I have

      #left {
      float: left;
      position: relative; /* relative Needed for IE/win */
      z-index: 6;
      }

      Now the obvious thing, seen on other pages, would be simply to make that
      position: fixed;. The page would be rendered normally and then the menu
      would stay put in its corner of the window however you scroll. In a
      narroew window you can't scroll it out left, it wiss stay in the way and
      in a shallow one the bottom entries might end up outside the window and
      inaccessible.

      The script needs to go into the <HEAD> (after modifying for your needs)
      as

      <SCRIPT TYPE="text/javascript" SRC="/base/fix-menue.js"></SCRIPT>

      It does its checking of window size and if appropriate exchanges that
      position: relative; with position: fixed; and back again when the window
      is made smaller.

      I forgot to mention that I wrote some of this up with a complete example
      here:
      http://axel.berger-odenthal.de/work/Sudel/Webdesign.htm

      Axel
    • Show all 29 messages in this topic