MDBLightBox Bug:incorrectly position of image


Topic: MDBLightBox Bug:incorrectly position of image

Zhou pro premium asked 2 years ago

I add sample code to my project. When there is only one picture, the location of the picture appears incorrectly.

I want to make the image absolutely positioned, but I couldn't find a way to do it, I want the image to be 16:9, but I don't want them to change with the resolution changes enter image description here


Krzysztof Wilk staff commented 2 years ago

Hi!

Is it possible to share your code with me? Just with the issue :)

Keep coding!


Krzysztof Wilk staff answered 2 years ago

Hi!

We are calculating styles for the image inside our component, so we have to fix that on our side. For now - you can add a div.lightbox-gallery-image { left: 0 !important } CSS style to fix that. Thanks for reporting that bug :)

Keep coding!


Zhou pro premium answered 2 years ago

<MDBLightbox> <MDBRow> <MDBCol lg='4'> <MDBLightboxItem src='https://mdbootstrap.com/img/Photos/Thumbnails/Slides/1.webp' fullscreenSrc='https://mdbootstrap.com/img/Photos/Slides/1.webp' className='w-100' /> </MDBCol> </MDBRow> </MDBLightbox> Only one image caused this problem. More than two images are ok.


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 3.0.0
  • Device: PC
  • Browser: chrome
  • OS: windows
  • Provided sample code: No
  • Provided link: No