Topic: mdb-image-modal portrait photos

royax1988 free asked 4 years ago


*Expected behavior*portrait photos would not destroy the other photos. i cant edit the css when using mdb-image-modal. it would be good if portrait or landscape photo could adjust like putting a css "object-fit: contain".

Actual behavior

landscape will adjust its height if in one row, it has portrait photos.

Resources (screenshots, code snippets etc.)

P.S. i am encountering error when attaching photos.


Konrad Stępień staff commented 4 years ago

Hi @royax1988,

Can you upload photos now?

Also please provide me with a code.

You can sets globally styles for your project in file styles.scss then you can set for every image or specific images object-fit: contain property.

If you have still a problem, please tell me about that.

Best, Konrad.


royax1988 free commented 4 years ago

i tried putting this one in my component scss file:

mdb-image-modal img.ng-thumb { object-fit: contain !important; }

but its not working.can you share it to me how to do that?


royax1988 free commented 4 years ago

Hi Konrad - i transferred my styling in style.scss and object-fit: contain now works. im good with this, thanks much for your help.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 9.0.0
  • Device: Mac
  • Browser: Chrome
  • OS: Mojave 10
  • Provided sample code: No
  • Provided link: No