# Vertical center div inside ion-slides

**URL:** <https://forum.ionicframework.com/t/vertical-center-div-inside-ion-slides/57608>\
**Category:** ionic-v3\
**Created:** [July 15, 2016, 2:44pm UTC](https://forum.ionicframework.com/t/vertical-center-div-inside-ion-slides/57608 "2016-07-15T14:44:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kingofspeed6](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/kingofspeed6/32/101723_2.png) [@kingofspeed6](https://forum.ionicframework.com/u/kingofspeed6)\
**Post date:** [July 15, 2016, 2:44pm UTC](https://forum.ionicframework.com/t/vertical-center-div-inside-ion-slides/57608/1 "2016-07-15T14:44:06Z")

</div>

Hello  
I want to add 2 buttons ( next, previous ) inside a slides of images ( which is got from internet )  
But i dont know how can i make verical center those button inside ion-sliders  
Please help me, i’ve tried all the suggestion that i found in Google  
Thanks in advance

Here is what i have to do  
 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/9/a/9af97afe31a1e5d5ddf3840b86fc3e2b58a04e70.png)

---

<div class="post-metadata">

**Author:** ![itlr](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/itlr/32/97646_2.png) [@itlr](https://forum.ionicframework.com/u/itlr)\
**Post date:** [July 15, 2016, 11:13pm UTC](https://forum.ionicframework.com/t/vertical-center-div-inside-ion-slides/57608/2 "2016-07-15T23:13:21Z")

</div>

Carousel is kind of a webish experience, native equivalent experience is something like [http://ionicframework.com/docs/v2/components/#slides](http://ionicframework.com/docs/v2/components/#slides) which allows full screen swiping.

If you really want to have this effect, first thing is to make a component for it, encapsulate the interactions in the component itself is a better approach.

There is more than one way to achieve what mid-alignment. A practical approach is to simply use something like

```auto
<section carousel>
  <ul images></ul>
  <div buttons>
    <button next></button>
    <button prev></button>
  </div>
</section>

scss

[carousel] {
  position: relative;
  
  [buttons] {
    position: absolute;
    top: 49%;
    clear: both;
    
    [prev] {
      float: left;  
    }

    [next] {
      float: right;
    }
  }
}

```

You may choose to use classes instead of property selectors, I was just trying to keep consistent with ionic’s approach.

Carousel implementation in general has tons of literature, go [http://www.unheap.com](http://www.unheap.com) and find a couple of jQuery plugins that do that well and learn from them.

It might be possible to wrap ionic’s slider component and build your customization based on that.

---

<div class="post-metadata">

**Author:** ![kingofspeed6](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/kingofspeed6/32/101723_2.png) [@kingofspeed6](https://forum.ionicframework.com/u/kingofspeed6)\
**Post date:** [July 18, 2016, 2:20pm UTC](https://forum.ionicframework.com/t/vertical-center-div-inside-ion-slides/57608/3 "2016-07-18T14:20:24Z")

</div>

Thanks itlr  
It works perfectly
