Can I move page above hash?

Discussion in 'HTML and CSS' started by velome, Sep 9, 2013.

  1. velome

    velome

    Joined:
    Sep 9, 2013
    Messages:
    1
    Hello all,

    I have an iframe in my page, and a treeview control. When users click on a tree-node, I set the corresponding page as source of the iframe.

    The page scrolls vertically. When the tree is long, and user clicks on a node somewhere at bottom, I want the page to move to the top, so the user sees the top of the page. The page has a banner that comes from the 'master page'.

    I am able to call javascript to make the page move only to top of the banner:
    location.hash = '#banner';

    My problem is that the page moves correctly to the banner, but shows horizontal scrollbar about an inch above the bottom. The scrollbar is not the issue, but its position 1 inch from bottom is the problem. Is there a way to prevent this, and make the page move to the banner top?

    Thanks in advance
    Last edited: Sep 9, 2013
    velome, Sep 9, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eduardo78
    Replies:
    0
    Views:
    233
    Eduardo78
    Nov 3, 2005
  2. rp
    Replies:
    1
    Views:
    478
    red floyd
    Nov 10, 2011
  3. Andrew Tomazos
    Replies:
    2
    Views:
    584
    Nobody
    Dec 12, 2011
  4. Srijayanth Sridhar
    Replies:
    19
    Views:
    581
    David A. Black
    Jul 2, 2008
  5. Pawel_Iks
    Replies:
    3
    Views:
    102
    Pawel_Iks
    Apr 9, 2008
Loading...

Share This Page