This comes after a whole days effort at fixing this. I have a card list displaying images and text.
There are two types of images
- where image height > width
- Image width > height.
I have no problem with the second. But with my first when I try to display the image after resizing it it sticks to the left side. I have pretty much tried every trick I know in css nothing seems to work. Please be advised I am not a expert in CSS.
One promising trick was to use transform: translateX(50pxs). But the problem I face is that I dont know if its 50 px or 100 px because that value will change for each image. Also I have two different kind of images here Landscape and Portrait. I dont want this rule being applied on the Landscape mode.
I also looked at compass for sass to use @if. But could not figure out how to select the different CSS settings based on the images actual width and length.
Can some one suggest how to get the images width and height after resizing and apply CSS rules based on these values.
It needs to be something like this.
Thanks and regards.