function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DML2020DML2020 

Edit HTML or CSS of LWC? And how?

I have an image located at the top of a LWC displayed using the following code
<lightning-layout-item size="4">
<img
src={imageName}
class="slds-align_absolute-center"
style="max-height: 5.8125rem; cursor: pointer;"
onclick={handleClickLogo}
/>
</lightning-layout-item>
which appears to be sliced off along the left and bottom edges (see photo).

image with left side and bottom partially cut off
How do I fix this? Any suggestions are welcomed

Best Answer chosen by DML2020
mukesh guptamukesh gupta
Hi, 

Please try to increase max-height: 5.8125rem ,

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh

All Answers

mukesh guptamukesh gupta
Hi, 

Please try to increase max-height: 5.8125rem ,

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh
This was selected as the best answer
DML2020DML2020

Hi Mukesh.

That did not help with removing the sliced off sections, only making it larger.

Could it perhaps be a container size issue that the image is housed in?

DML2020DML2020
Mukesh, the problem was with the uploaded image. It was incorrect/ sliced off to begin with.