none
How to create Back To Top link RRS feed

  • Question

  • Could someone please tell me how to create a Back To Top link in Expression Web 2? I can't seem to make it work. I found one article and it said to:       

    Place this code at top of page

    <a name="Top"></a>

    Then place this code where you need the Back to Top link

    <p class="UCBackToTop"><a href="#Top">Back to Top</a></p>

     

    Thank you.

    Tuesday, October 12, 2010 7:11 PM

Answers

  • Are you sure it's not working? If the location where the bookmark anchor is placed is visible when the link is clicked, you will not observe any change. I just tested your markup in a page long enough for the "Top" location to be off-screen and it worked as expected.

    Note that it will only move the page to the location of the bookmark. For example, in my test page, the bookmark was placed below the header image div, but above all other content. When I clicked the link, it moved the viewport to the exact location of the bookmark; the header was still off-screen.

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.
    • Proposed as answer by Steve Easton Tuesday, October 12, 2010 10:21 PM
    • Marked as answer by MaggieJ57 Wednesday, October 13, 2010 2:59 PM
    Tuesday, October 12, 2010 7:54 PM
  • Also, it only moves if needed.  If the viewport requires no scrollbar or the scrollbar is all the way to the top you'll see no effect.

    --
    Chris Hanscom - Microsoft MVP
    On Facebook | On Twitter | Resource Center | Veign's Blog | Web Development Help

    Get a Complete Website Analysis by Veign
    • Proposed as answer by Steve Easton Tuesday, October 12, 2010 10:21 PM
    • Marked as answer by MaggieJ57 Wednesday, October 13, 2010 2:59 PM
    Tuesday, October 12, 2010 8:20 PM

All replies

  • Are you sure it's not working? If the location where the bookmark anchor is placed is visible when the link is clicked, you will not observe any change. I just tested your markup in a page long enough for the "Top" location to be off-screen and it worked as expected.

    Note that it will only move the page to the location of the bookmark. For example, in my test page, the bookmark was placed below the header image div, but above all other content. When I clicked the link, it moved the viewport to the exact location of the bookmark; the header was still off-screen.

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.
    • Proposed as answer by Steve Easton Tuesday, October 12, 2010 10:21 PM
    • Marked as answer by MaggieJ57 Wednesday, October 13, 2010 2:59 PM
    Tuesday, October 12, 2010 7:54 PM
  • Also, it only moves if needed.  If the viewport requires no scrollbar or the scrollbar is all the way to the top you'll see no effect.

    --
    Chris Hanscom - Microsoft MVP
    On Facebook | On Twitter | Resource Center | Veign's Blog | Web Development Help

    Get a Complete Website Analysis by Veign
    • Proposed as answer by Steve Easton Tuesday, October 12, 2010 10:21 PM
    • Marked as answer by MaggieJ57 Wednesday, October 13, 2010 2:59 PM
    Tuesday, October 12, 2010 8:20 PM
  • Thanks so much paladyn and Veign. I'm sorry to have posted. I see now that I just didn't understand how it would work. I tested on a link that wasn't far enough down.  It's working now.
    Tuesday, October 12, 2010 10:03 PM
  • Maggie,

    Don't worry about it I'm sure you are not the first and won't be the last to make the same mistake.


    MS MVP Expression Tutorials & Help http://by-expression.com & Expression Web forums
    Tuesday, October 12, 2010 10:21 PM
  • Thanks Cheryl.  Probably right.
    Tuesday, October 12, 2010 10:27 PM
  • Yeah, how d'ya think we learned about it?  ;-)

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.
    Tuesday, October 12, 2010 11:05 PM