Print Reseller Scheme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

smoothscroll that works with fixed heading and has offset in em not px

Discussion in 'Website Coding & Programming Forum:' started by Levi, Aug 10, 2014.

  1. Levi

    Levi Moderator Staff Member

    As title really I need to find a smoothscroll (jquery is fine, using it anyways) that works with a fixed heading with a 7em offset.

    Hell it would be nice to find one that works with a fixed header, the one that I had that works without a fixed heading doesn't work with a fixed header, they just jump to the link (could quite easily be me missing something obvious) :thumbdown:

    Also all the smoothscrolls I've found use pixel offset, I need em's as that's how I've done my measurements.... you can't really use pixels in responsive design

    So for reference

    Layout of site is
    fixed div header with nav linking to anchor sub headings (ie #anchor)
    div wrapper for 'text'
    div for anchor sub headings (ie div id="anchor")

    anchor links work fine except for offset and I can't find a working smoothscroll :(
  2. Levi

    Levi Moderator Staff Member

  3. Just for the benefit of anyone else with a similar issue, what did you do to resolve this issue?
  4. Levi

    Levi Moderator Staff Member

    I didn't end up using ems, I used javascript to 'measure' the height and then set the offset accordingly

Share This Page