question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

width and height with 0px

See original GitHub issue

I’m trying to make a dynamic image of the server be shown with zoom or it is there but it is not shown

                    <ngx-image-zoom
                        [thumbImage]="content.items[0].mediaPath"
                    ></ngx-image-zoom>

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
saeed-abdul-rahimcommented, Oct 19, 2020

My workaround was: Going to styles.css file in your angular project and add:

.ngxImageZoomContainer {
    width: auto !important;
    height: auto !important;
}
0reactions
DgarciarDevcommented, Aug 29, 2020

Hi, This is working for me…

its a manual solution, but its urgent now:

I’m using “ngx-image-zoom”: “^0.6.0”, Angular 9 and DOM elements:

in my html:

<lib-ngx-image-zoom id="elevatezoomBig" mode="hover" [thumbImage]="imgPrincipal" [fullImage]="imgPrincipal"></lib-ngx-image-zoom>

in my TS file:

ngAfterViewInit() { var c = document.getElementById("elevatezoomBig").children[0]; c.removeAttribute("style"); c.setAttribute("style", "imgContainer"); }

… and in my css file:

.imgContainer{ width: 100% !important; height: auto !important; }

i’m not sure if is a best practice, but is a solution for me

Regards,

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a way to keep the element width when 0px in height?
I have an issue with the CSS min-height property in Safari. For instance, in Chrome, Firefox and other browsers you are allowed to...
Read more >
height - CSS: Cascading Style Sheets - MDN Web Docs
The height CSS property specifies the height of an element. By default, the property defines the height of the content area.
Read more >
Exploring the Complexities of Width and Height in CSS
Let's explore the complexities of how CSS computes the width and height dimensions of elements. This is based on countless late-night hours ...
Read more >
div width 0px and height 0px not working
Hello. I am trying to have a div with a width and height of 0px. I am creating a Javascript tool that the...
Read more >
imgviewer-5596.txt
padding: 0px; margin: 0px; margin-left: 0px; } #thumb-item-container li ... version width: 95%; */ /* For Desktop version */ /*max-width: 895px; max-height: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found