1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Navigation for a LONG document

Discussion in 'HTML & Website Design' started by SEMMatt, Jun 1, 2010.

  1. #1
    Can anyone suggest a navigation element or method for a long text based document. Our only stipulation is that the navigation stay visible even when users scroll to the bottom of the document...basically it should be constant.

    Thanks in advance.
     
    SEMMatt, Jun 1, 2010 IP
  2. cshwebdev

    cshwebdev Active Member

    Messages:
    226
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    80
    #2
    Using CSS, you'd be able to declare the navigation a fixed position.

    Heres an example:

    CSS
    (Can be converted to inline (Declared with the element), placed in the head section, or an external stylesheet)
    
    #navigation {
        position: fixed;
        width: 200px; //Make the navigation box 200px wide, we'll need to know this so we can position the content to the right "x" pixels
    }
    
    #document {
       margin-left: 200px; //How far we want to set the margin, relative to the navigation width
    }
    
    Code (markup):
    HTML
    (Placed in Body Section):
    
    <div id="navigation">
    Navigation Block
    </div>
    
    <div id="document">
    Document block
    </div>
    
    Code (markup):
     
    cshwebdev, Jun 1, 2010 IP
    shahilroyhere likes this.
  3. shahilroyhere

    shahilroyhere Well-Known Member

    Messages:
    189
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Absolutely perfect solution.
    Though I will also like to say that if you have more than 2-3 menu items then don't show it constantly cause it may be annoying to the user. Rather duplicate the same menu in the similar position in the footer.

    Regards,
    Acmeous.
     
    shahilroyhere, Jun 1, 2010 IP
  4. SEMMatt

    SEMMatt Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    cshwebdev, that is really perfect and exactly what I was looking for. Thanks!
     
    SEMMatt, Jun 2, 2010 IP
  5. SEMMatt

    SEMMatt Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    hello all,

    I actually encountered a bug. i.e. that this CSS navigation doesn't work in IE. I tested on multiple PCs and through multiple HTML pages ( to make sure that it's not my code)

    Any ideas?
    Thanks,
    Matt
     
    SEMMatt, Jun 2, 2010 IP