Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Vertically Align images in carousel

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

I have horizontally centered the images but I can't get the css right to vertically align the carousel images to the middle .

TEMP URL: empirearbitration.com/index.php?option=com_content&view=article&id=100:diversity-receivers&catid=36:ip-network-server-controllers&Itemid=413

Is this possible with ZT2?
  • ODiN Mayland's Avatar
  • ODiN Mayland
  • LIfetime Developer - Big Bamboo
  • 818 posts
  • 10 Thanks
  • Karma: 8
The administrator has disabled public write access.
I know it is problematic in css to align vertically

css-tricks.com/centering-css-complete-guide/

I had a look at this for a while and couldn't get it

I ended up just adding a height

.zentools.zt-no-margin .zt-image img {

height: 100px;

}
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
You would either want to use a module id or the position to avoid any potential issues with other modules if you tried this

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
I wish, but height: 100px distorts the image.
  • ODiN Mayland's Avatar
  • ODiN Mayland
  • LIfetime Developer - Big Bamboo
  • 818 posts
  • 10 Thanks
  • Karma: 8
Last Edit: 8 years 6 months ago by ODiN Mayland.
The administrator has disabled public write access.
The consensus appears to be that this is the best way, but it is not working for me:

.parent {
position: relative;
}
.child {
position: absolute;
top: 50%;
transform: translateY(-50%);
}

So I thought it may be xero or zentools2 that is prohibiting that from working....
  • ODiN Mayland's Avatar
  • ODiN Mayland
  • LIfetime Developer - Big Bamboo
  • 818 posts
  • 10 Thanks
  • Karma: 8
Last Edit: 8 years 6 months ago by ODiN Mayland.
The administrator has disabled public write access.
One of options I did try was this

.zentools.zt-no-margin .zt-image {
position: relative;
}
.zentools.zt-no-margin .zt-image img {
position: absolute;
top: 50%;
transform: translateY(-50%);
}
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
MAGIC! It works now. I must have needed some extra selectors...

Thanks!
  • ODiN Mayland's Avatar
  • ODiN Mayland
  • LIfetime Developer - Big Bamboo
  • 818 posts
  • 10 Thanks
  • Karma: 8
The administrator has disabled public write access.
ah I discounted this as I thought the images looked better with a height :)
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Also you may want to add the moduleid as I said before to avoid any conflicts with other modules
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers