Title: Fixed header bug (Karuna)
Last modified: July 21, 2017

---

# Fixed header bug (Karuna)

 *  [Jan Boddez](https://wordpress.org/support/users/janboddez/)
 * (@janboddez)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/fixed-header-bug-karuna/)
 * Hi!
 * Just wanna report what I believe is a (tiny) bug in the Karuna theme.
 * It’s about `var stuckHeader = $( '.sticky-wrapper.sticking' );` and `var stickyHeaderHeight
   = stuckHeader.outerHeight();` in functions.js, really.
 * On page load, there’s no `.sticking` class on the `.sticky-wrapper` div. As such,`
   stickyHeaderHeight` ends up being `null`. (Can be seen writing `stickyHeaderHeight`
   to the console.)
 * As a result, no `padding-top` is added to `body` on scroll, and the page kind
   of ‘jumps up’. This is noticeable especially when the header image is not set.(
   Headings — or the page-wide header widget, if in use — will suddenly disappear
   behind the fixed header on scroll, making them a bit harder to read.)
 * A quick fix would be to be to hard-code a (large enough) value (in px or ems)
   into the JavaScript file.
 * Another, and I believe cleaner (or at least less jerky in e.g. Firefox) fix I’ve
   used (at [http://www.farma-service.be/](http://www.farma-service.be/), e.g.),
   is to assign `position: static` to the entire header (through an extra wrapper
   div) and a hard-coded offset to `body`. (Upon scroll, the `.sticky-wrapper` div
   will sit ‘on top’ of the (now hidden) top-bar. No need to hide it or add padding
   to `body`. You would still need to know the (almost) exact final _sticking_ header
   height, though.
    -  This topic was modified 8 years, 10 months ago by [Jan Boddez](https://wordpress.org/support/users/janboddez/).
    -  This topic was modified 8 years, 10 months ago by [Jan Boddez](https://wordpress.org/support/users/janboddez/).
      Reason: Typos

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [Kathryn Presner](https://wordpress.org/support/users/zoonini/)
 * (@zoonini)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/fixed-header-bug-karuna/#post-9367642)
 * Hi [@janboddez](https://wordpress.org/support/users/janboddez/) – thanks for 
   the detailed report! I’ve passed it along to our developers so they can have 
   a look and we’ll keep you posted here.
 *  Theme Author [Automattic](https://wordpress.org/support/users/automattic/)
 * (@automattic)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/fixed-header-bug-karuna/#post-9461418)
 * Howdy!
 * Thanks much for this report! We’ve made a fix to Karuna which should take care
   of this in the next version of the theme.
 * Cheers,
    Caroline

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Fixed header bug (Karuna)’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/karuna/1.2.6/screenshot.png)
 * Karuna
 * [Support Threads](https://wordpress.org/support/theme/karuna/)
 * [Active Topics](https://wordpress.org/support/theme/karuna/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/karuna/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/karuna/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Automattic](https://wordpress.org/support/users/automattic/)
 * Last activity: [8 years, 9 months ago](https://wordpress.org/support/topic/fixed-header-bug-karuna/#post-9461418)
 * Status: not resolved