Does Ionic have any built-in class to vertical align list button?


#1

It’s weird that the icon/button is item is not vertically middle align. Once add more content than demo list content (which is very normal I guess), the button/icon on left remain on top.

Is there any built-in class to handle this? Please advice, thank you.


#2

Hi,
Here is how I would do it with button on the right side:

The key is to add another class on the button to center it vertically:

.rightCenterDeleteButton {
  position: absolute !important;
  right: 0;
  top: 50%;
  margin-top: -23px !important; /* half the height of delete button */
}

#3

Thank you very much. I’ll try now and reply with result later. Thanks again. Appreciate your help very much.


#4

Thank you so much. It work. I just need to add !important to ‘top: 50%;’

Once again, thank you.