# Search box in ion-header overlaps with ion-content

**URL:** <https://forum.ionicframework.com/t/search-box-in-ion-header-overlaps-with-ion-content/7838>\
**Category:** ionic-v1\
**Created:** [August 7, 2014, 10:34am UTC](https://forum.ionicframework.com/t/search-box-in-ion-header-overlaps-with-ion-content/7838 "2014-08-07T10:34:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jorre](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jorre/32/64847_2.png) [@jorre](https://forum.ionicframework.com/u/jorre)\
**Post date:** [August 7, 2014, 10:34am UTC](https://forum.ionicframework.com/t/search-box-in-ion-header-overlaps-with-ion-content/7838/1 "2014-08-07T10:34:26Z")

</div>

I’m trying to add a search box in order to filter a list.

The search field should not scroll, that’s why I put it inside of the ion-header-bar.  
The list that gets filtered is long so I want that to scroll, that’s why it’s inside the ion-content area.

Functionality works great, except for the fact that when I put the search box you can see on the screenshot inside the header (in order to not be part of the scrolling area), it overlaps with my list in the ion-content area.

I can put the search box inside my list in ion-content, that solves the overlapping problem, but then it scrolls with the search results and that’s what I want to avoid. Any idea how to avoid the overlap?

Thank you!

![](https://sea1.discourse-cdn.com/ionicframework/uploads/default/3072/79bf8f33affa36cb.png)

---

<div class="post-metadata">

**Author:** ![dschniepp](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@dschniepp](https://forum.ionicframework.com/u/dschniepp)\
**Post date:** [August 7, 2014, 12:15pm UTC](https://forum.ionicframework.com/t/search-box-in-ion-header-overlaps-with-ion-content/7838/2 "2014-08-07T12:15:47Z")

</div>

Have you tried to add some css like `margin-top` to the list?

---

<div class="post-metadata">

**Author:** ![jorre](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jorre/32/64847_2.png) [@jorre](https://forum.ionicframework.com/u/jorre)\
**Post date:** [August 7, 2014, 1:10pm UTC](https://forum.ionicframework.com/t/search-box-in-ion-header-overlaps-with-ion-content/7838/3 "2014-08-07T13:10:19Z")

</div>

Would that be the go-to solution in this case? Feels like cheating 🙂

Adding text instead of the search box moves the list down just fine like expected so there must be a better way no?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [August 7, 2014, 3:53pm UTC](https://forum.ionicframework.com/t/search-box-in-ion-header-overlaps-with-ion-content/7838/4 "2014-08-07T15:53:18Z")

</div>

This is because of how `has-subheader` works. Right now when there’s a subheader in the view, we adjust the top value, which works okay, but if your subheader is bigger than 44px, the content gets overlapped.

In future release, we’re moving to flex box to solve this issue. But for right now, adjust the value of `has-header` to fit your needs or make a new class to apply to ion-content, `has-big-subheader`

---

<div class="post-metadata">

**Author:** ![jorre](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jorre/32/64847_2.png) [@jorre](https://forum.ionicframework.com/u/jorre)\
**Post date:** [August 7, 2014, 4:44pm UTC](https://forum.ionicframework.com/t/search-box-in-ion-header-overlaps-with-ion-content/7838/5 "2014-08-07T16:44:36Z")

</div>

Ok makes sense! Thanks for clearing this up mharington and dschniepp!
