# How to add an image banner right below the navigation bar?

**URL:** <https://forum.ionicframework.com/t/how-to-add-an-image-banner-right-below-the-navigation-bar/16331>\
**Category:** uncategorized\
**Created:** [January 25, 2015, 2:46am UTC](https://forum.ionicframework.com/t/how-to-add-an-image-banner-right-below-the-navigation-bar/16331 "2015-01-25T02:46:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![trungk18](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@trungk18](https://forum.ionicframework.com/u/trungk18)\
**Post date:** [January 25, 2015, 2:46am UTC](https://forum.ionicframework.com/t/how-to-add-an-image-banner-right-below-the-navigation-bar/16331/1 "2015-01-25T02:46:19Z")

</div>

Hi everyone,

I am creating my first app build on Ionic but I have some trouble when I want to include the image header right above the navigation bar. This is my screen

![image](https://global.discourse-cdn.com/ionicframework/original/2X/e/e71ae320c1eae1cbbca22e009e149e4d7ee7f6da.png)

And my code here. First I add some code about navigation and this div contain image on **\> index.html**

```
<body ng-app="hearingApp">
    <ion-nav-bar class="bar bar-header nav-title-slide-ios7 mhearing-bar" align-title="center">
    </ion-nav-bar>
    <div class="row header-banner">
        <div class="col-33">
            <img class="logo-left img-responsive" src="img/logo-left.png" />
        </div>
        <div class="col-67">
            <img class="logo-right img-responsive" src="img/logo-right.png" />
        </div>
    </div>
    <div class="clearfix"></div>
    <ion-nav-view></ion-nav-view>
</body>

```

And in my **app.js** I config some route.

```
.config(function($stateProvider, $urlRouterProvider) {
    $stateProvider

    .state('hearings', {
        url: '/hearings',
        controller: 'HearingsController',
        templateUrl: "templates/hearings.html",
    })

    .state('hearing', {
        url: '/hearings/:hearingGUID',
        controller: 'HearingController',
        templateUrl: "templates/hearing.html"
    })
    $urlRouterProvider.otherwise("/hearings");
})

```

But I found some problem, the first one is when loaded pages, my “hearings” route page seem not realize the navigation bar, because i found on ion-content has auto generate “has header” class with 44px white as you see on below image  
And the second one is I can’t scroll to the end of the

![image](https://global.discourse-cdn.com/ionicframework/original/2X/2/21b5035a9186222533b182961bfa414dada7ccdc.jpg)

Have anyone face with this problem before? Thanks for your help 😃

---

<div class="post-metadata">

**Author:** ![brandyshea](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brandyshea/32/148286_2.png) [@brandyshea](https://forum.ionicframework.com/u/brandyshea)\
**Post date:** [January 26, 2015, 6:59pm UTC](https://forum.ionicframework.com/t/how-to-add-an-image-banner-right-below-the-navigation-bar/16331/2 "2015-01-26T18:59:55Z")

</div>

I would recommend using a subheader. When you add a subheader it will add the class `has-subheader` to the content. If you want the subheader to be taller than 44px you will have to override the `height` of the `bar-subheader` and the `top` of the `has-subheader`. This means you will need to have a specified height. See this codepen for example: [http://codepen.io/anon/pen/JoJxEL](http://codepen.io/anon/pen/JoJxEL)

If you don’t want it to be absolutely positioned over the content, that’s a different story.

---

<div class="post-metadata">

**Author:** ![trungk18](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@trungk18](https://forum.ionicframework.com/u/trungk18)\
**Post date:** [January 27, 2015, 1:44am UTC](https://forum.ionicframework.com/t/how-to-add-an-image-banner-right-below-the-navigation-bar/16331/3 "2015-01-27T01:44:56Z")

</div>

Thanks for your answer, I am taking a try for this solution. But in the other hand, If I want to set height for this header image dynamically, so do you have any suggestion 😃

---

<div class="post-metadata">

**Author:** ![brandyshea](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brandyshea/32/148286_2.png) [@brandyshea](https://forum.ionicframework.com/u/brandyshea)\
**Post date:** [January 27, 2015, 8:44pm UTC](https://forum.ionicframework.com/t/how-to-add-an-image-banner-right-below-the-navigation-bar/16331/4 "2015-01-27T20:44:10Z")

</div>

I’m not an AngularJS expert 😛 but this should get you started: [http://codepen.io/anon/pen/OPjyVX](http://codepen.io/anon/pen/OPjyVX)

I added a directive `customSubheader` to change the property `top` of `has-subheader`. I set `bar-subheader` height to `auto` in the CSS. I’m sure it can be cleaned up. Hope that helps.

---

<div class="post-metadata">

**Author:** ![trungk18](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@trungk18](https://forum.ionicframework.com/u/trungk18)\
**Post date:** [January 29, 2015, 8:21pm UTC](https://forum.ionicframework.com/t/how-to-add-an-image-banner-right-below-the-navigation-bar/16331/5 "2015-01-29T20:21:02Z")

</div>

Thanks for your help but when I select to another screen by routing, It’s not working til I refresh on browser, so I find another way to deal with this 😃 Only fix height for header banner is good choice.

Anw, thanks you so much

---

<div class="post-metadata">

**Author:** ![Thesurya9](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/thesurya9/32/117460_2.png) [@Thesurya9](https://forum.ionicframework.com/u/Thesurya9)\
**Post date:** [November 10, 2016, 9:32am UTC](https://forum.ionicframework.com/t/how-to-add-an-image-banner-right-below-the-navigation-bar/16331/6 "2016-11-10T09:32:11Z")

</div>

Thank You @brandyshea. that’s really helpful for me. I was stucking with ionic-content-banner !!  
but problem is solved with sub-header. !! Thank again. 🙂 🙂
